<div dir="ltr"><div>Now that's a slick way to do it.  That will definitely make life easier in the future.</div><div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 12:54 PM, Anthony Holloway <span dir="ltr"><<a href="mailto:avholloway+cisco-voip@gmail.com" target="_blank">avholloway+cisco-voip@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you would like to support multiple languages in UCCX, it's rather easy and convenient.  The explanation is long, but the idea is simple.<div><br></div><div>Here's an example to point you in the right direction:</div><div><br></div><div>Say you had a script like this and its trigger language was set to en_US</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;padding:0px;border:currentColor"><div><font face="courier new, monospace">Start</font></div><div><font face="courier new, monospace">Accept (--Triggering Contact--)</font></div><div><font face="courier new, monospace">Play Prompt (--Triggering Contact--, P[greeting.wav])</font></div><div><font face="courier new, monospace">Terminate (--Triggering Contact--)</font></div><div><font face="courier new, monospace">End</font></div></blockquote><div><br></div><div>The caller will dial your trigger, UCCX will assign the en_US language to the Contact*, and then play the prompt named greeting.wav from the following Prompt folder in the repository:  en_US  That is why you do not need to type P[en_US/greeting.wav], even though in the web page you clearly have to click on the en_US folder to see this wav file.</div><div><br></div><div>*The key thing to note is that your Contact (aka caller) is what gets assigned a language.  Not your script, and not your application.</div><div><br></div><div>Now, one thing to mention, but I wont go into detail, is that UCCX will automatically search backwards in less specific language folders for your file, until it finds a filename match.  E.g., if greeting.wav was not in en_US, then UCCX looks in en, and if not there either, UCCX looks in default last.</div><div><br></div><div>Ok, so now we should know that en_US comes from the trigger setting (go ahead and look, I'll wait).  So, if you wanted to change the language, you would do it at the trigger level.  And by changing the language of the trigger, you change the folder search path from: en_US > en > default, to es_US > es > default.</div><div><br></div><div>That means that, as long as you have your Spanish recording for the greeting inside of a greeting.wav file which is under the es_US folder, you don't even need to modify your script at all.  UCCX will automatically play the Spanish version of your prompt.  Pretty cool if you ask me.</div><div><br></div><div>But maybe you don't know to go all English or all Spanish.  Maybe you want the user to choose English or Spanish from an up front menu.  Let's modify our script from above.</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;padding:0px;border:currentColor"><div><font face="courier new, monospace">Start</font></div><div><div><font face="courier new, monospace">Accept (--Triggering Contact--)</font></div></div><div><div><font face="courier new, monospace">Menu (--Triggering Contact--, P[language-menu.wav])</font></div></div><div><div><font face="courier new, monospace">  1 - English</font></div></div><div><div><font face="courier new, monospace">    Set Contact Info (--Triggering Contact--)   // This is where you set the new language for the Contact  E.g., L[en_US]</font></div></div><div><div><font face="courier new, monospace">  2 - Spanish</font></div></div><div><div><font face="courier new, monospace">    Set Contact Info (--Triggering Contact--)   // This is where you set the new language for the Contact  E.g., L[es_US]</font></div></div><div><div><font face="courier new, monospace">Play Prompt (--Triggering Contact--, P[greeting.wav])</font></div></div><div><div><font face="courier new, monospace">Terminate (--Triggering Contact--)</font></div></div><div><font face="courier new, monospace">End</font></div></blockquote><div><br></div><div>Based on what we know from earlier, the language-menu.wav will play from the language folder that the trigger has assigned to it.  So this must exist in a single language.  The contents of the audio can say whatever you want.  After the user makes a selection, the script rewrites their language setting from what the trigger has already set, and then the greeting is played in the new language.  Or, from the new language folder to be more specific.</div><div><br></div><div>Final note, if the language folder you need is not already created in UCCX for you, you can create it yourself by clicking the Create Language button right next to the Upload Prompt/ZIP button.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 12:24 PM, Erick Wellnitz <span dir="ltr"><<a href="mailto:ewellnitzvoip@gmail.com" target="_blank">ewellnitzvoip@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Been a while since I have had to do much with CCX.</div><div><br></div><div>I remember back in the day we could set up some string variables, concatenate them and have a nice clean way to cut our script in half when doing two different languages.  </div><div><br></div><div>For instance:</div><div>1 - English (set language string to EN)</div><div>2 - Spanish (set language string to SP)</div><div><br></div><div>Then we could concatenate EN + "/" + promptname.wav</div><div><br></div><div>There must be a way that I'm just not seeing.</div><div><br></div><div>Any advice would be great!</div><div><br></div><div>Thanks!</div></div>
<br>_______________________________________________<br>
cisco-voip mailing list<br>
<a href="mailto:cisco-voip@puck.nether.net" target="_blank">cisco-voip@puck.nether.net</a><br>
<a href="https://puck.nether.net/mailman/listinfo/cisco-voip" target="_blank">https://puck.nether.net/mailman/listinfo/cisco-voip</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>