cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
233
Views
0
Helpful
1
Replies
Beginner

Access to data set in Application_modifier element.

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

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Beginner

Re: Access to data set in Application_modifier element.

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

1 REPLY 1
Beginner

Re: Access to data set in Application_modifier element.

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

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.