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

  1. 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>

  2. Copy custom_messages.js from below folder to the folder created in Step 1:

    AI_DIR/siebel/scripts/siebel/samples

  3. Open the file you saved in Step 2 using a JavaScript editor.
  4. Locate the following code:

    function _SWEgetGlobalCustomMsgAry()

    {

    if (! _SWEbCMsgInit)

    {

    SWEbCMsgInit = true;

    }

    return _SWEcustommsgAry;

    }

  5. 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:

    • ID is a string that you use to reference the custom_string. You can use any value for ID.
    • custom_string is a text string that includes text that you manually translate into the language that your deployment requires.

      For example, you can use the following code to convert the text label that Siebel Open UI uses for the New button that it displays on the Contact List Applet to Neu, and the Delete button to Löschen:

    function _SWEgetGlobalCustomMsgAry()

    {

    if (! _SWEbCMsgInit)

    {

    SWEbCMsgInit = true;

    SWEcustommsgAry["New"] = "Neu";

    SWEcustommsgAry["Delete"] = "Löschen";

    }

    return _SWEcustommsgAry;

    }

  6. Save the file.
  7. 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.

  8. In the Expressions list, add the following expression for the language where the string will be used:
    Field
    Name
    Expression

    Value

    <Name of the expression> such as Dutch

    Language()='<Language code> such as DEU

  9. Navigate to the Manifest Files view to add the new file under manifest files.
  10. Add an entry for custom_message.js in the new folder created in Step 1 as follows:

    siebel/custom/deu/custom_messages.js

  11. Navigate to the Manifest Administration view to add a new record.
  12. In the Objects UI list, create a new entry and specify the object as follows:
    Field
    Type
    Usage Type
    Name

    Value

    Application

    Common

    PLATFORM_INDEPENDENT

  13. In the Object Expression list, add the following subexpression:
    Field
    Group Name
    Expression
    Level

    Value

    Not Applicable

    Dutch

    1

  14. In the Files list, click Add.
  15. In the Files dialog box, query for the path and filename that you added in Step 10.
  16. Click Go.
  17. Save the changes to the manifest.
  18. Log out of the Siebel client, clear browser cache, and log in again.
  19. Test your work:
    1. Navigate to the screen that includes the control that Siebel Open UI uses to display the translated string that you modified in Step 4.
    2. 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

  1. 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.

  2. 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");

  3. Test your work:
    1. Navigate to the screen that includes the control that Siebel Open UI uses to display the translated string that you modified in Step 2.
    2. Verify that the control displays the translated string.
Configuring Siebel Open UI Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.