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 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 That the Customization Package Contains.

  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 Siebel 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 except for the views.xml file.

    Use the following format:

    #string_id

    For example:

    <cell size="22">
    <static id="account_label" tab_order="6">
      <text>#lbl_account</text>
      </static>
      </cell>
    

    The views.xmlfile.

    Use the following format:

    $string_id$

    For example:

    <str key="all_accounts">
    <![CDATA[ 
    <?xml version="1.0"?> <view  type="table"> 
    <viewname>$view_siebel_accounts$</
    viewname>  ................................. </view> 
    ]]> 
    </str
    

    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);
    
  4. Add the XML files to the customization package.

  5. Republish the customization package.

    For more information, see Republishing Customization Packages.