For models that are published in multiple languages, you can view and modify model objects in the different languages.
We recommend that you handle multilingual support in the import view for a variety of reasons. You can reduce the number of query items contained in each dimension and query subject. With fewer dimensions, query subjects, and query items, the model is more manageable. You can simplify maintenance by doing all multilingual work in one place instead of in different business views. This ensures consistency because the languages are set up correctly for all modelers to use. This is particularly important for segmented models.
To support multilingual metadata, do the following:
For information about how to enable multilingual modeling, see Example - Create a Multilingual Project for Relational Metadata.
You can create reports that show data in more than one language and use different regional settings. This means that you can create a single report that can be used by report consumers anywhere in the world.
The samples databases provided with Cognos 8 store a selection of text fields, such as names and descriptions, in more than 25 languages to demonstrate a multilingual reporting environment. For information about how data is stored in the samples databases and how the samples databases are set up to use multilingual data, see the Administration and Security Guide.
Here is the process for creating a multilingual reporting environment:
The data then appears in the language and with the regional settings specified in
the user's Web browser options
the run options
the Cognos Connection preferences
Any text that users or authors add appears in the language in which they typed it.
To enable a project to work with multiple languages, you must set up data sources to support multiple languages.
For relational data sources, you can support multiple languages by using one or more of the following:
Language-specific database tables
The data source should contain the same tables for each supported language. For example, if the Product table supports English, French, and German, the data source has tables named Product_en, Product_fr, and Product_de.
Language-specific columns
A database table should contain the same columns for each supported language. For example, if the Product table supports English, French, and German, the table has columns for ProductName_en, ProductName_fr, and ProductName_de.
Language-specific rows
A database table should contain an additional column to identify the language of each row of data, such as a column named LANG.
These solutions can make the multilingual data sources large and difficult to manage.
You can model a single relational query subject to represent all possible data source languages by using parameter maps and session parameters in the query subject definition. For more information, see Creating Prompts with Query Macros and Multilingual Metadata.
Note: Expression syntax is specific to the design language of the model. If you import objects from a model designed in another language, you may have to adjust the expression syntax.
For SAP BW metadata, you do not need to use parameters to support multilingual reporting. Since SAP BW automatically provides data in the language that matches the logon settings for the current user. If there is no metadata for the current user’s language, Framework Manager retrieves data in the default language.
You can model multilingual data that is stored in multiple tables, columns, or rows for each supported language. You can use macros with parameter maps and session parameters to create dimensions or query subjects that retrieve data in the preferred language of the person viewing the report.
The location of a parameter in the query subject definition depends on the location of multilingual data in the data source. You must have a parameter map in the macro.
Data source location | Parameter location | Example |
A column with a language key in another column | Select list | Select PRODUCT_TYPE.PRODUCT_TYPE_CODE, PRODUCT_TYPE.PRODUCT_LINE_CODE, PRODUCT_TYPE.PRODUCT_TYPE_ #$Language_lookup {$runLocale}# as Product_type from [gosales].PRODUCT_TYPE PRODUCT_TYPE |
Rows whose language is identified by a special column, such as LANG | Filter | Select PRODUCT.PRODUCT_NAME, PRODUCT_MULTILINGUAL. PRODUCT_NUMBER from [gosales].PRODUCT, [gosales].PRODUCT_MULTILINGUAL Where PRODUCT.PRODUCT_NUMBER = PRODUCT_MULTILINGUAL. PRODUCT_NUMBER and (PRODUCT_MULTILINGUAL."LANGUAGE" = #sq($Language_lookup{$runLocale})# |
You can add a language to a project at any time. For example, you do this if the values for a language were not translated earlier.
When you add a language to a project, Framework Manager generates a new property value for every multilingual property of each object in the project. A multilingual property is any text property that appears in a report, such as Name, Description, and Screen Tip.
The new values that Framework Manager assigns to these text properties are a combination of the original property value preceded by the language code. For example, if a dimension is named Country, and you add the Dutch language, Framework Manager inserts a name whose value is (nl)Country.
Each project contains two types of language definitions:
design language
This is the language in which the model was originally created. This value is stored in the model and cannot be changed. It serves as the default language value.
active language
This is the language in which model content is currently shown. When you open a model, the active language is set to the language in the model that most closely matches the region and language settings of the computer. You can change this value at any time for your current session only. In future sessions, the model continues to open in the design language.
From the Project menu, click Languages, Define Languages.
In the Available languages box, select each language you want to add and click the arrow button to move it to the Project languages box.
Tip: To remove a language, select it in the Project languages box and click the arrow button to move it to the Available languages box.
If you want to change the active language, in the Project languages box, click a language and click Set as Active.
Click OK.
At the prompt, accept the changes you made to the project.
Click OK.
If you want to view multilingual property values in the Properties pane, click the Languages tab.
You can generate and export a translation table to simplify the task of translating model objects. The translation table contains a list of all the text strings defined for multilingual properties, such as Name, Description, and Screen Tip. Translators can then use an external application, such as Microsoft Excel, to type the required information in the table.
You can export a translation table as either a comma-separated value file (.csv) or Unicode text file (.txt). You must export the translation table as a Unicode text file if it either contains a non-Latin language or will be imported by a computer with a language setting that is different from your own computer.
Select the objects you want to export.
From the Project menu, click Languages, Export Translation File.
In the Project Languages box, click the languages you want to export, and click the arrow button to move them into the Languages to be exported box.
You must export the design language of the model that will use the translation table. For example, if the translation table will be used in a model that uses French as the design language, you must export French.
Framework Manager exports the appropriate locale code for each language you select. If you do not select all the languages to be translated, you must manually enter the language codes in the first row of each new language column in the translation table.
In the Model objects to be exported box, select whether you want to export all model objects, or export only preselected objects and their children.
Enter the location and name of the translation table.
Click OK.
You can add text property values for each language defined in your model by importing translated data from a file. The imported file must be a translation table that was used by translators to enter the required translated values.
The translation table must contain the design language of the model that will use the translation table. The translation table can contain a subset of the languages defined for the project.
From the Project menu, click Languages, Import Translation File.
In the Project Languages box, click the languages in the translation table, and click the arrow buttons to move them to the Translate from and Translate into box.
You must select the design language for this model.
In the Apply translation to box, select whether you want to apply the translation to all model objects, or only to preselected objects and their children.
Enter the location and name of the translation file.
Click OK.
You want to create a model that can be used by English, French, and German report authors. You also want the Cognos 8 studios to automatically show metadata in the language required by the report author.
In the go_data_warehouse sample, you need to do the following:
Translate the metadata.
Use macros to create a multilingual project.
You can modify the dimensions and query subjects to show multilingual content by using the Language_lookup parameter map and the runLocale session parameter.
Open the go_data_warehouse project.
Ensure that English, French, and German are supported languages:
From the Project menu, click Languages, Define Languages.
Ensure that the Project languages pane contains English, French, and German.
In the Project Viewer pane, click a query item and, in the Properties pane, click the Languages tab.
For the name, description, and tool tip text, you see one entry for each language.
Export all the languages and objects in the project to a comma-separated value file (.csv) named GOSLDW-ML.csv.
From the Project menu, click Languages, Export Translation File.
In the Project Languages box, Ctrl+click English, French, and German, and click the top arrow to move them to the Languages to be exported box.
In the Export languages to this file box, enter the location of GOSLDW-ML.csv.
Open the GOSLDW-ML.csv file in Microsoft Excel, and translate the strings.
Note that each column represents a given language, and the file contains only the text strings that exist in the model.
In Framework Manager, import the translated file:
From the Project menu, click Languages, Import Translation File.
In the Project Languages box, move French and German into the Translate into box.
In the Import translation table from this file box, enter the location of GOSLDW-ML.csv.
In the Project Viewer, double-click the Language_lookup parameter map.
Note that the keys match the possible values for the runLocale session parameter, which identifies the language of the current user. These keys are mapped to the language values that are defined in the go_data_warehouse database.
Ensure that the parameter map contains the following information.
Key | Value |
de | DE |
en | EN |
fr | FR |
Select an object that contains multilingual columns, such as the Order method dimension, and, from the Actions menu, click Edit Definition.
The language identifier that was appended to the query item name is replaced by a parameter map and the runLocale session parameter:
Select
ORDER_METHOD_DIMENSION.ORDER_METHOD_KEY,
ORDER_METHOD_DIMENSION.ORDER_METHOD_CODE,
ORDER_METHOD_DIMENSION.ORDER_METHOD_#$Language_lookup{$runLocale} # AS ORDER_METHOD
from
[go_data_warehouse].ORDER_METHOD_DIMENSION
To preview the results, click the Test tab and then click Test Sample.
From the Project menu, click Session Parameters and change the runLocale session parameter value to fr.
Test the Order method dimension again to view the results.