Siebel CRM Desktop for IBM Notes Administration Guide > Customizing Siebel CRM Desktop > Customizing UI Behavior >

Localizing Strings


To localize strings, you add a resource string to a resource file and then reference that string from other XML files.

To localize strings

  1. Add a new resource string for the custom label and attribute name or warning message that you must localize. Add this resource string in the following files:
    • Use the Ln_package_res.xml file for a default resource.
    • Use the package_res.xx_YY.xml file for a specific locale.

      where:

    • xx_YY is the language you use in your implementation.

      For example, for Portuguese Brazilian you use package_res.pt_BR.xml.

      The following standards determine the locale naming convention:

    • xx. The ISO 639-1 standard for the language.
    • YY. The ISO 3166-1 standard for the country. This standard supports dialects and language adoptions for specific countries.

      For more information, see Files in the Customization Package.

  2. Specify a localizable string. You add the following code:

    <str key="string_id">localizable_string</str>

    where:

    • string_id is the Id of the localizable string. The double quotes are required.
    • localizable_string is the localizable string.
  3. Use the localizable string Id in every location where CRM Desktop must display the string.

    You must use different formats to specify the string in different types of files. Use values from the following table.

    File Type
    Description

    Any XML file.

    Use the following format:

    #string_id

    For example:

    <type id="Opportunity" state_field="ObjectState">
      <view label="#obj_opportunity" label_plural="#obj_opportunity_plural" small_icon="type_image:Opportunity:16" normal_icon="type_image:Opportunity:24" large_icon="type_image:Opportunity:48" filters_display_mode="hidden_child"></view>

    Any JavaScript file.

    Use the following format:

    session.res_string("string_id")

    For example:

    ui.message_box(0, session.res_string("msg_general_error"), session.res_string("msg_general_error_caption"), 0x40);

    Any DXL file.

    Use the following format:

    [!loc:string_id:loc!]

    For example:

    <formula>@If(@IsNewDoc;"[!loc:FRM_ACCOUNT_WINDOW_TITLE_NEW:loc!]";"[!loc:FRM_ACCOUNT_WINDOW_TITLE_EXISTING:loc!]: " + Name)</formula>

    where:

    • FRM_ACCOUNT_WINDOW_TITLE_NEW is an example of resource Id.

    In another example, assume the user must use a string value instead of resource Id, and that this string contains a double quote ("). For example:

    aaa"bbb

    In this situation, you must add a backslash (\) immediately before the double quote. For example:

    <formula>@If(@IsNewDoc;"aaa\"bbb";"[!loc:FRM_ACCOUNT_WINDOW_TITLE_EXISTING:loc!]: " + Name)</formula>

  4. Add the XML files to the customization package.
  5. Republish the customization package.

    For more information, see Republishing Customization Packages.

Siebel CRM Desktop for IBM Notes Administration Guide Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.