You can use the following procedure to change the default application language within the application. With this procedure, in effect, you can create multilingual applications.
To change the default language within an application:
- Place a node in the main call flow, at the point where you want to change languages.
- Right-click the node you just placed.
- From the pop-up context menu, select Edit NodeName.java, where NodeName is the name assigned to the node. Dialog Designer displays the Java code editor for the node.
- Place your cursor at the beginning of the Java code, just after the first line, which says: package flow;
- Enter the following code on the line where you placed the cursor:
- import com.avaya.sce.runtimecommon.SCESession;
Just to keep things tidy and make it easier to read the code, it is a good idea to
make sure there is a blank line both before and after this line of code.
- Scroll down and locate the lines of code that read as follows:
- * Returns the Next item which will forward application execution
- * to the next form in the call flow.
- Place your cursor on the blank line just above these lines of code.
- Enter the following code:
- public void requestBegin(SCESession session) {
- session.setCurrentLanguage("language");
- where language is the name of the language you want to change to. This must be entered exactly as it appears in the project properties.
- To save your changes, with the focus in the Java code editor, press Control+S.
- Close the Java code editor.