Sunday, October 14, 2012

How to implement multilingual functionality in a FM Model


Introduction

This document illustrates detailed steps to create a multilingual model. No reporting tool has inbuilt language translation capability and this has to be done explicitly.  Modelers add multilingual metadata by defining which languages the model supports, translating text strings in the model for things such as query subject & query item names and descriptions, and defining which languages are exported in each package.

Create a Multilingual Project for Relational Metadata

If your project wants to create a model that can be used by English and German report authors; You also want the IBM Cognos 10 studios to automatically show metadata in the language required by the report author then open the project and perform the below listed steps to embed multilingual capability to your metadata .

Consider we have following model in which we want to include multilingual functionality. And we want to see all the data items of Business layer in English and German.



Following are the steps to achieve our objective

Define Language           

1. Open the FM project.
2. From the Project menu, click Languages, Define Languages.



3. 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.




  
4. If you want to change the active language, in the Project languages box, click a language and click Set as Active. In our case active language is English (encircled in red).
5. Click OK.

At the prompt, accept the changes you made to the project.

6. Click OK.
7. If you want to view multilingual property values in the Properties pane, click the Languages tab.  You can observe that if we change the language to German the names of all objects (Data item and Query subject) are changes and (de) is prefixed to each name. This is shown in below screenshot.


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. Now we will manually translate these names (prefixed with(de)) to german language.

Export Language Translation


Export all the languages and objects in the project to a comma-separated value file (.csv) named name.csv. Steps:
1. From the Project menu, click Languages, Export Translation File.




2. In the Project Languages box, Ctrl+click English and German, and click the top arrow to move them to the Languages to be exported box.





3. In the Export languages to this file box, enter the location of <name>.csv.  in this case I have used multilingual.CSV. Select the “Selected objects” radio button since we want to translate only Business layer components. If you we to translate entire model then select “All”


4. Once the translation is exported open the multilingual.csv file in Microsoft Excel, and translate the strings as shown below:



Each column represents a given language, and the file contains only the text strings that exist in the model.


Import Language Translation

Now we will import the updated translation file .The imported file must be a translation table that was used by translators to enter the required translated values. Steps
1. From the Project menu, click Languages, Import Translation File.




Following pop up  appears




2. 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.

3. 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.

4. Enter the location and name of the translation file.



 Click OK.







Check for the FM – Language Translation

Once the translation is complete; we can review the FM model by ensuring Active Language set to English as shown below.



As soon as active language is changes to English, the translated member names start appearing in English. Same thing applies if the active language is set to German.




Publish the metadata

Create and publish the package into Public Folder. We need to make sure that all the preferred languages got included into the model as shown below. Languages can be specified while creating the package or at a later stage from the package propertiesà languages in the properties pane appearing at the bottom part.




Click Ok.













Cognos Connection


To check the behavior of multilingual metadata that we have published, we need to change the Cognos Connection content language to the preferred language. In this case we change it to German/English (depends on the language we want user to see data in).

Please note that this is set by the administrator for each user and we will set this to German for users sitting in Germany and English for those in the United States.



Click OK.

Query Studio Appearance

Open Query Studio to ensure that the metadata got translated into the desired content language.

If the language is set to German, metadata appears in German Language.