Localize set names

To display set names in other languages, create a process that creates the Caption attribute for all member names in the dimension, and then assigns values for the set names that you want to translate. This option is available only if your organisation has deployed IBM® Planning Analytics version 2.0.4 or later.

About this task

A Caption attribute is a type of attribute that is required for every set that you want to translate.

Caption attributes are created through the TurboIntegrator process. When you create Caption attributes, they must be set up as an alias type with unique locale-specific values.

Planning Analytics Workspace then uses the browser language settings to determine which language to display. You can see objects in that language without needing any additional configuration.

International language codes that are defined by ISO 639-1 are used to identify major languages and IETF language tags to identify specific locales. For example, fr identifies French, while fr-CA identifies French (Canada).

You can assign Caption attribute values for major language codes, such as fr, as well as any associated specific locales, such as fr-Fr or fr-CA.

If a Caption attribute value does not exist for a given specific locale, the value of the associated major language code is retrieved. For example, if a Caption attribute value does not exist for pt-BR, the value for pt is retrieved.

If no values are found for a Caption attribute, the base default attribute value is returned.

You can see which ISO 639-1/IETF combinations are supported in the }Cultures control dimension.

Procedure

  1. Create a new process.
  2. In the Prolog, create the Caption attribute as an alias attribute.
    Type
    SubsetAttrInsert('<dim_name>', '', 'Caption', 'A');

    To find out more, see SubsetAttrInsert.

    This function creates a control cube called SubsetAttributes_<dim_name> with the following dimensions: }Subsets_<dim_name>, }SubsetAttributes_<dim_name>.

  3. For each subset that you want to translate, add a SubsetAttrPutS function for each language that you want to make available on your database:
    SubsetAttrPutS( '<String>', '<dim_name>', '<set_name>', 'Caption', '<Lang_Locale_Code>' );

    For example, if you want to display the Sales set in the Departments dimension in French, include the following function:

    SubsetAttrPutS( 'Ventes', 'Departments', 'Sales', 'Caption', 'fr' );

    This creates a control cube called LocalizedSubsetAttributes_<dim_name> with the following dimensions: }Subsets_<dim_name>, }Cultures, }SubsetAttributes_<dim_name>.

What to do next

To test this process, save the book, then set the browser language setting to the language that you want to display. Refresh the browser and add a view that contains the translated set. Check that the set name is displayed in the correct language.