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 client-side 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 the following 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["CUSTOM_ID"] = "custom_string";   
      }   
      return _SWEcustommsgAry;   
    }
    

    where:

    • CUSTOM_ID is a string that you use to reference the custom_string. You can use any value for CUSTOM_ID.

    • custom_string is a text string that includes text that you manually translate into the language that your deployment requires.

  6. Add the following code at the beginning of the new file:

    SiebelApp.S_App.LocaleObject.m_bClientStringsInitialized = false;
  7. Save the file.

  8. 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.
  9. 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”

  10. Navigate to the Manifest Files view to add the new file under manifest files.

  11. Add an entry for custom_message.js in the new folder created in Step 1 as follows:

    siebel/custom/deu/custom_messages.js
    
  12. Navigate to the Manifest Administration view to add a new record.

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

  14. In the Object Expression list, add the following subexpression:

    Field Group Name Expression Level

    Value

    Not Applicable

    DEU

    1

  15. In the Files list, click Add.

  16. In the Files dialog box, query for the path and filename that you added in Step 11.

  17. Click Go.

  18. Save the changes to the manifest.

  19. Customized translated string is now available for creating client side control via customized presentation model. Use the locale object GetLocalString API to retrieve the customized string. Update customized presentation model and provide appropriate values to the GetCtrlTemplate API to retrieve the string.

  20. Log out of the Siebel client, clear browser cache, and log in again.

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