Configuring Siebel Open UI > Customizing Styles, Applets, Fields, and Controls > Customizing Controls >
Displaying Control Labels in Different Languages
This topic describes how to modify the custom_messages.js file so that Siebel Open UI displays the text for a control label according to the language that the client browser uses. You can also modify the presentation model instead of modifying the custom_messages.js file. For more information about how to do this, see Customizing Presentation Models to Display Control Labels in Different Languages. For more information about language support, see Languages That Siebel Open UI Supports. To display control labels in different languages
- Copy custom_messages.js file from:
INSTALL_DIR\applicationcontainer\webapps\siebel\scripts\siebel\samples
- Save a copy of the file that you copied in Step 1, to:
INSTALL_DIR\applicationcontainer\webapps\siebel\scripts\siebel\custom
- Open the file you saved in Step 2 using a JavaScript editor.
- Locate the following code:
function _SWEgetGlobalCustomMsgAry()
{
if (! _SWEbCMsgInit)
{
SWEbCMsgInit = true;
}
return _SWEcustommsgAry;
}
- Add the following bolded code to the code that you located in Step 4:
function _SWEgetGlobalCustomMsgAry()
{
if (! _SWEbCMsgInit)
{
SWEbCMsgInit = true;
SWEcustommsgAry["ID"] = "custom_string";
}
return _SWEcustommsgAry;
}
where:
function _SWEgetGlobalCustomMsgAry()
{
if (! _SWEbCMsgInit)
{
SWEbCMsgInit = true;
SWEcustommsgAry["New"] = "Neu";
SWEcustommsgAry["Delete"] = "Löschen";
}
return _SWEcustommsgAry;
}
- Test your work:
- Navigate to the screen that includes the control that Siebel Open UI uses to display the translated string that you modified in Step 4.
- Verify that the control displays the translated string.
Customizing Presentation Models to Display Control Labels in Different Languages
This topic describes how to customize a presentation model so that it displays a control label in a different language instead of modifying the custom_messages.js file. To customize presentation models to display control labels in different languages
- Use a JavaScript editor to open the presentation model that Siebel Open UI uses to display the control label that you must modify.
For more information, see About the Presentation Model.
- Add the following code to call the ExecuteMethod method that the presentation model uses. You can add this code anywhere in the presentation model file:
pm.ExecuteMethod("AddLocalString","ID","custom_string");
where:
pm.ExecuteMethod("AddLocalString", "New", "Neu");
pm.ExecuteMethod("AddLocalString", "Delete", "Löschen");
- Do Step 6 under Displaying Control Labels in Different Languages.
|