Using the sample files to create a multilingual data module

You can download two sample .xlsx files, provided by IBM, that support multilingual data and multilingual metadata, and use them to create a multilingual data module.

The following sample files are available for download:

Global_retail_sales_multilingual.xlsx
This file contains the business data in multiple languages. The last column named Product language specifies the language of each row.
Download location: https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/C11/data/Global_retail_sales_multilingual.xlsx
Metadata.xlsx
This file contains all of the text strings, including the names of the two uploaded files, and the table column headings. Each row contains the original English string and the equivalent translated string for French and Chinese. The Short identifier and Long identifier columns are also included.
Download location: https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/C11/data/Metadata.xlsx

Procedure

  1. Upload the Global_retail_sales_multilingual.xlsx and Metadata.xlsx sample files to Cognos® Analytics.
  2. Create a data module selecting the two uploaded files as the sources.
    Uploaded files as the sources
  3. Click the Languages icon Translate button.
  4. In the pane, click the Add metadata translation icon Add icon.
  5. In the Create language dialog box, add the French and Chinese translation definitions.
    For the French translation, specify the following settings:
    • For Label, type French.
    • To language
    • For , select French.
    • For From language, select English.
    • In the data tree, expand Metadata.xlsx, and drag the column Original text onto the Original text field field.
    • Drag the column French text onto the Translated text field field.
    • Optional: Drag the column Long identifier onto the Long identifier field field.
    • Click OK.
    For the Chinese translation, specify the following settings:
    • For Label, type Chinese (China).
    • For To language, select Chinese (China).
    • For From language, select English.
    • In the data tree, expand Metadata.xlsx, and drag the column Original text onto the Original text field field.
    • Drag the column Chinese text onto the Translated text field field.
    • Optional: Drag the column Long identifier onto the Long identifier field field.
    • Click OK.

    The following translation definitions are added to the Languages pane.

    Uploaded files as the sources
  6. Create a filter in the data module that will return only the rows that contain the user’s locale, as specified in the Product language column in the Global_retail_sales_multilingual.xlsx file.
    1. In the Data module pane, select the Global_retail_sales_multilingual.xlsx file, and from its context menu, click Properties.
    2. On the Filters tab, from the Select a column drop-down menu, click via expression editor.
    3. Click Add a filter.
      Add filter
    4. In the expression editor, specify the filter name Product language, and enter the following expression:
      Product_language IN (#sq(toupper(substr($runLocale,0,2)))#)
      Add filter
    5. Validate the expression, and click OK to save the filter.
    In the Data module pane, the filter Product language is added as the last column within the Global_retail_sales_multilingual.xlsx data tree. The filter is set to English (EN).
  7. Save the data module.
  8. Test the data module to see if the translated metadata is displayed as expected.
    1. From the Personal menu Personal menu icon in the application bar, click Profile and settings.
    2. On the Settings tab, set Content language to French, and reload the page.

      In the Data module pane, the filter Product language is now set to French (FR).

    3. In the Global_retail_sales_multilingual.xlsx data tree, click any column with the text data type. For example, Product line or Product.

      The labels in the grid are now displayed in French and the data uses French locale settings.

      Test French translation