We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Language settings are not being applied globally

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
jperez1107
Posts: 3
Joined: Wed Apr 14, 2010 5:40 pm

Language settings are not being applied globally

Post by jperez1107 »

I have a document that needs to be completely in Spanish. I have set the language setting at the beginning of the document to Spanish, however, I noticed that certain "default" options don't convert to Spanish. For example, if there is incorrect input from the user, a default message in the program plays similar to: "I'm sorry, I can't understand you" and then my prompt will replay. That default message plays in English. (I refer to it as a default message because I didn't code it into my document. It automatically plays up to four times when there is incorrect entry and upon the fourth time it disconnects the call.

The code at the beginning of my document sets the language as follows:

Code: Select all

<?xml version="1.0"?>
<vxml xml:lang="es" version="2.0" xmlns="http://www.w3.org/2001/vxml">
Can you help me figure out how to change these default prompts to Spanish as well.

jperez1107
Posts: 3
Joined: Wed Apr 14, 2010 5:40 pm

Re: Language settings are not being applied globally

Post by jperez1107 »

As a follow up to this question, based on the code I have at the beginning of the document (which I have provided above), will the user be able to "speak" the answer in Spanish (i.e. "si" and "no" for "yes" and "no"), or do I have to add anything else to the code to make sure voice input in the Spanish language will be recognized?

Thank you!

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: Language settings are not being applied globally

Post by support »

Hi jperez1107,

About those "default" messages (noinput/nomatch), the messages do not automatically convert to Spanish. You will need to specify these messages in your IVR code in Spanish.

The following IVR code should help you achieve what you're trying to accomplish:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0" xml:lang="es-MX">

<property name="incompletetimeout" value="2s"/>
<property name="timeout" value="5s"/>
<property name="confidencelevel" value="0.75"/>

<form id="spanish">
<field name="answer">
<grammar type="application/srgs+xml" root="ROOT" mode="voice" xml:lang="es-MX">
<rule id="ROOT">
<one-of>
<item>sí<tag>answer='sí'</tag></item>
<item>si<tag>answer='sí'</tag></item>
<item>ci<tag>answer='sí'</tag></item>
<item>no<tag>answer='no'</tag></item>
<item>non<tag>answer='no'</tag></item>
</one-of>
</rule>
</grammar>

<prompt>
  <speak xml:lang="es-MX"><voice name="Paulina" gender="female">
    Si or no?
  </voice></speak>
</prompt>

<filled>
  <prompt>
    <speak xml:lang="es-MX"><voice name="Paulina" gender="female">
      Usted dijo <value expr="answer"/>.
    </voice></speak>
  </prompt>
</filled>

<noinput>
  <prompt>
    <speak xml:lang="es-MX"><voice name="Paulina" gender="female">
      Apesadumbrado, no podría oírle. Intente por favor otra vez. 
    </voice></speak>
  </prompt>
  <reprompt/>
</noinput>

<nomatch>
  <prompt>
    <speak xml:lang="es-MX"><voice name="Paulina" gender="female">
      Apesadumbrado, no podría entenderle. Intente por favor otra vez. 
    </voice></speak>
  </prompt>
  <reprompt/>
</nomatch>

</field>
</form>
</vxml>
Hope this helps.

Regards,
Plum Support

Post Reply