02-28-2017 08:39 AM
Hi
I have to change the application modifier element based on the language user has selected. For example there are several texts for TTS for different language. Based on the language selected by the user ,I want to change the xml:lang parameter. Now I am using multiple Application Modifier element but want to know how can I do that using an Action element ?. How to get the current lang set in the application and change it dynamically ?( I mean programmatically).
help / hint on this much appreciated.
Thanks in Advance.
Raghu
Solved! Go to Solution.
02-28-2017 09:05 AM
Hi Raghu,
You can set it via action element specifying a java class like so:
public class SetDocumentLanguage extends ActionElementBase
{
@Override
public void doAction(String name, ActionElementData data)
throws AudiumException
{
String currentDocLang = data.getDocumentLanguage();
data.setDocumentLanguage("en-US");
}
}
You can also set your document language in an OnCallStart class so it applies to the entire application flow transparently.
-Ryan
02-28-2017 09:05 AM
Hi Raghu,
You can set it via action element specifying a java class like so:
public class SetDocumentLanguage extends ActionElementBase
{
@Override
public void doAction(String name, ActionElementData data)
throws AudiumException
{
String currentDocLang = data.getDocumentLanguage();
data.setDocumentLanguage("en-US");
}
}
You can also set your document language in an OnCallStart class so it applies to the entire application flow transparently.
-Ryan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide