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

Access to data set in Application_modifier element.

r.boloor.rao
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

Ryan Hilfers
Level 1
Level 1

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

View solution in original post

1 Reply 1

Ryan Hilfers
Level 1
Level 1

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