Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: null on 28-11-2005 07:45:00 AM Hi, We are using Audium 3.4.1 with the Nortel OSR 2.0 gateway adapter under Weblogic 8.1 on Solaris.
I would like to know if it's possible to configure the language attribute setting in the grammar VXML element : <grammar mode="voice" type="..." xml:lang="en-AU" ....>
The current setting value is "en-US" and I cannot find anywhere to change that in the Solaris environment (?) or the java API (?)
Thanks very much for your help on this Mitch
Subject: RE: grammars language setting Replied by: Vance Vagell on 28-11-2005 05:46:08 PM Hello Mitch,
To change the value of the xml:lang attribute in custom VoiceXML that is generated for an Audium application, change the "language" setting under the application's general settings:
1) Right-click on the application's project in the Navigator view and choose "properties".
2) Click on "Audium - General Settings".
3) Specify the desired language (e.g. "en-AU").
4) Click OK.
5) Deploy the application.
Regards, Vance
Subject: RE: grammars language setting Replied by: null on 30-11-2005 02:52:36 AM Hi Vance,
We'd tried setting the language to en-AU under the general application settings however this appears to have only set the language at the top level, the grammar tag is still explicitly setting en-US. See below for an example:
I've noticed that in the release notes for CallServices 3.4.3 that you can now set a grammar language in the plugin.xml. Is this the only way? This might solve our immediate issue but may limit us in the future.
Thanks, Mitch
Subject: RE: grammars language setting Replied by: Vance Vagell on 30-11-2005 04:22:51 PM Hi Mitch,
Thank you for providing that example. After discussing this with our developers, it has been determined that the application language does indeed not effect (and is not intended to effect) the grammar xml:lang attribute. However, there are several solutions for what you are trying to accomplish:
1) If you are using Audium Call Services 3.4.3, you can add a "grammar_default_language" parameter to your gateway adapter's plugin.xml file. This parameter can be used to specify the default language that the gateway adapter will specify in <grammar> tags. For more information about this new feature, please view the Audium Call Services 3.4.3 release notes in this post from our download forum, and search for "AC-138".
2) If you are using external grammars that you can modify, include the desired xml:lang attribute value in the grammar itself. This may take precedence over the value in the <grammar> element, depending on the voice browser being used. If you choose this option, please run tests to ensure it functions as desired.
3) You can create a custom voice element that produces a <grammar> tag with the xml:lang attribute set to the value of your choosing. The VGrammar class (a Voice Foundation Class from the Audium Java API) includes a setLanguage() method that allows you to specify the language to use for this attribute. Using this, you can create your own custom form that allows you to configure the value for this attribute. This solution will produce the desired VoiceXML, since you have complete control over its output. For more information about the VGrammar class, please refer to the Audium Java API JavaDocs.
4) You can wrap the existing Form element. First, create a custom voice element that extends MFoundationForm. Then, in addXmlBody() call super.addXmlBody() to obtain a VMain object that contains the Form-generated VFCs. Navigate this structure, and call the setLanguage() method on each VGrammar object you encounter. This solution has not been tested and is recommended only for advanced developers. For an example of how to extend MFoundation form and manipulate the VFCs it produces, please download the AdvancedSampleCode.zip archive from this post, and refer to ExtendedElementExample.java.
Additionally, we have created an issue in our internal issue-tracking system to recommend that future versions of the Form element include a configurable language setting so that the value of <grammar> elements' xml:lang attributes are easily configurable. If you would like to track the progress of this request, please refer to AE-67 when speaking with your Audium Account Representative.
Regards, Vance
Subject: RE: grammars language setting Replied by: null on 01-12-2005 01:03:02 AM Thanks very much Vance, options 1, 3 and 4 are definitely acceptable options for us.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: