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
- Create the following folder structure, if it does not exist, where <lang> is the language code such as DEU:
AI_DIR/siebel/scripts/siebel/custom/<lang>
- Copy custom_messages.js from below folder to the folder created in Step 1:
AI_DIR/siebel/scripts/siebel/samples
- 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 code in bold 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;
}
- Save the file.
- Navigate to the Administration - Application screen of your Siebel client, then the Manifest Expressions view.
NOTE: You need to have administrative privileges in the Siebel client.
- In the Expressions list, add the following expression for the language where the string will be used:
|
|
|
Value |
<Name of the expression> such as Dutch |
Language()='<Language code> such as DEU |
- Navigate to the Manifest Files view to add the new file under manifest files.
- Add an entry for custom_message.js in the new folder created in Step 1 as follows:
siebel/custom/deu/custom_messages.js
- Navigate to the Manifest Administration view to add a new record.
- In the Objects UI list, create a new entry and specify the object as follows:
|
|
|
|
Value |
Application |
Common |
PLATFORM_INDEPENDENT |
- In the Object Expression list, add the following subexpression:
|
|
|
|
Value |
Not Applicable |
Dutch |
1 |
- In the Files list, click Add.
- In the Files dialog box, query for the path and filename that you added in Step 10.
- Click Go.
- Save the changes to the manifest.
- Log out of the Siebel client, clear browser cache, and log in again.
- 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");
- 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 2.
- Verify that the control displays the translated string.
|