How to set language sent to Voxeo to spanish

Hey Adam, I got this to work, but I ended up having to place the
xml:lang in the prompt, rather than in the vxml header because for
some reason, when I placed it in the header the calls would stop
working. I committed these changes to my clone joaquinblaya-ehs, if
you were interested.

I'm cc'ing the opendatakit list so that others can know about this.


··· On Wed, Jan 26, 2011 at 1:35 AM, Adam Lerer wrote: > Hmm...looking at your form more closely, I noticed that the language tags > are marked "en" and "es" rather than "English" and "Spanish" as in > > > If you're going to use "en" and "es" in your form, you need to set these > (rather than "English" and "Spanish") as keys in the localeMap. (the > localeMap becomes sort of obviated by your choice of lang names, but I'm > leaving "English" and "Spanish" in the main repo because the docs still say > to use "English" and "Spanish" in your XForm). > > Adam > > On Tue, Jan 25, 2011 at 11:26 PM, Adam Lerer wrote: >> >> Hi Joaquin, >> >> That's an interesting question - I don't think that feature is currently >> implemented, but it shouldn't be hard. >> >> Now, I -believe- that all rendering of tags is localized to >> WidgetBase.createPrompt(String[], String[], boolean). >> >> I would change the relevant line to look something like this: >> >> String vxml = "> xml:lang=\"" + GlobalConstants.DEFAULT_LOCALE + "\">"; >> >> (sorry about all the ugly quote escaping). You might want to check that >> there aren't stray hardcoded tags elsewhere, but I don't think >> there are. >> >> ---------------------- >> >> As a side note, there is a mechanism for changing language/locale that you >> should continue to support, even if you're not using it. To do that, you >> first need to add Spanish to because ODK doesn't know what >> 'language' (XForms terminology) corresponds to what 'locale' (VoiceXML >> terminology). Just add >> >> localeMap.put("Spanish", new Locale("es")) >> >> or something like that. (This is kind of irrelevant to your question, but >> will be handy in the future when you want to switch languages. >> >> Then, inside of WidgetBase you need to add a new object attribute "Locale >> l", and have it be set by setLocale, and then replace DEFAULT_LOCALE with l. >> >> You know what, this would be easier for me to make a first pass at. I'm >> going to check it in and you can try it out in the morning (no promises). >> >> Best, >> Adam >> >> P.S. I bet there's away in VoiceXML to globally specify the language for a >> document rather than on a prompt-by-prompt basis. >> >> 2011/1/25 Joaquín Blaya >>> >>> Adam, >>> I've gotten to the point where I've installed the spanish TTS in >>> Prophecy and it works internally in Prophecy. However, from what I >>> can tell Prophecy requires that the prompts be of the form >>> >>> >>> >>> in order for the Spanish language TTS to work. I've created the >>> spanish resource file, created the Spanish Locale >>> and placed it as the default in, however, I can't >>> figure out how to have ODK-Voice tell Prophecy that it should read >>> everything in spanish. >>> >>> The XML already has lang="es" in there, but somehow it's not in the >>> appropriate spot because Prophecy still uses the english voice. If I >>> delete the english voice in Prophecy and only leave the spanish one, >>> it stops working. That's what was the problem before. >>> >>> I'm attaching an example XML here. >>> >>> Thanks, >>> >>> Joaquin >>> >>> -- >>> ___________________________________________________________________ >>> Gerente de Desarrollo, eHealth Systems >>> Research Fellow, Escuela de Medicina de Harvard >>> Moderador, >> > >


Gerente de Desarrollo, eHealth Systems
Research Fellow, Escuela de Medicina de Harvard