If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Multi Language Reports

Started by babu babu, 23 Nov 2010 07:45:15 PM

Previous topic - Next topic

babu babu

Hi,
I have the columns Product_en,Product_ge,product_fr etc.... how can i show the related column in framework manager based on user login.Suppose if the user login with german it should fetch product_ge.please give me the solution.

Thanks!
Anand.

MFGF

Hi,

Each user can select their default language from the User Preferences dialog within Cognos Connection.  This then sets a session parameter called $runLocale.

You will need to translate the Cognos-specific language codes in runLoacle into the language codes used within your database, and probably the easiest way to do this is via a Parameter Map.  Add a parameter map within Framework Manager, and within this, add each Cognos langiage code as a Key, and the corresponding database language code next to it as a Value.  If you want a quick, easy way to get hold of the Cognos language codes, import the Language_lookup.txt file that ships with the samples - you can then replace the Values with your own database language codes.

Lastly, you will need to define a calculation in your query subject to retrieve the appropriate product based on the language using a macro.  The easiest way to code this is as follows:

1. Drag the Product_en column in as the initial expression and enclose it in single quotes, so it looks like this:
'[Namespace].[Query Subject].[Product_en]'

2. Remove the en] from the expression so it looks like this:
#'[Namespace].[Query Subject].[Product_'#

3. Add macro code to retrieve the user's language code and translate it into a database language code using the parameter map and concatenate it to the partial item name:
#'[Namespace].[Query Subject].[Product_' + $Your_Parameter_Map{$runLocale}#

4. Add a close square parenthesis and concatenate it to the item name:
#'[Namespace].[Query Subject].[Product_' + $Your_Parameter_Map{$runLocale} + ']'#

Regards,

MF.
Meep!

NaviGator

Hello Guys,

I have managed to control the multilingual function in the reports without changing the user preferences.

In my case I have done the modeling in FM the same way that MFGF illustrated and then I adjusted the user local in the authentication provider - in my case it was LDAP - .

So if the user local in LDAP is EN, the cognos connection and reports will run in EN. If it is FR, It will be FR and so on. I remember also that In the documentation also they have mentioned that cognos can detect the Language from the machine local or from the browser local .. 

Hope this could help..
Never Stop Learning ..

blom0344

In case you need to support a fixed set of languages you can realize this without using both parameter maps and macro's



CASE # sq($runLocale  )#
WHEN 'de' THEN [Transformationlayer].[sometable].[somefield_DE]
WHEN 'en' THEN [Transformationlayer].[sometable].[somefield_EN]
ELSE
[Transformationlayer].[sometable].[somefield_NL]
END


which would obviously require some rework when a fourth language comes into play..

MFGF

Thanks Ties - that's a very useful tip! :)
Meep!

saumil287

The explanation is vey nice.

But having some doubts here.
Does it converts column names also? If yes then does it convert at run time or fetch from the database.

For this, We need to set the runlocale of each user that is accessing the reports.
So based on runtime, it checks the runlocale of the user and translates the reports based on the value set in runlocale , Is that right?

Thanks
saumil

MFGF

Quote from: saumil287 on 28 Sep 2015 01:30:39 AM
The explanation is vey nice.

But having some doubts here.
Does it converts column names also? If yes then does it convert at run time or fetch from the database.

For this, We need to set the runlocale of each user that is accessing the reports.
So based on runtime, it checks the runlocale of the user and translates the reports based on the value set in runlocale , Is that right?

Thanks
saumil

Hi,

No translation of the data is being done, in fact. To see your data in any other language values, you need to have the data pre-translated and stored in your database. Cognos then just fetches the appropriate rows/columns based on the value set in $runLocale (if you tell it to).

If you have defined multiple language column names for each column (query item) in Framework Manager, then these will be used - again based on the value in $runLocale. If not, then the column names will remain fixed.

Cheers!

MF.
Meep!

blom0344

This is a VERY OLD post.  :o   
The  # sq($runLocale  )# can be used to manipulate content. If you want to make headers multilingual, then use an expression within the column header instead of a fixed text. We got this to work with users with either Dutch, English or German runlocale settings. The runlocale will need to be set for each individual user.  Back then we used a bit of an SQL hack against the contentstore to enforce a setting for individual users

saumil287

Hi guys,
Thanks for your reply.

I am having some doubts as follows:

1. I created a report and saved, Changed the user preference to FR, and ran the report.
Data translated to france, Column headings got appended with (fr). eg PRODUCT_DESCRIPTION(fr).

2. I created another report, saved and from run with options, I change to france and ran the report,
Both data and column name got translated.

The question is
In Q1, Why did PRODUCT_DESCRIPTION did not got fully translated, Is this bcoz cognos does not have the same name in France?

In q2, Both data and column name got translated.

Thanks
saumil sanghvi

MFGF

Quote from: saumil287 on 28 Sep 2015 03:47:31 AM
Hi guys,
Thanks for your reply.

I am having some doubts as follows:

1. I created a report and saved, Changed the user preference to FR, and ran the report.
Data translated to france, Column headings got appended with (fr). eg PRODUCT_DESCRIPTION(fr).

2. I created another report, saved and from run with options, I change to france and ran the report,
Both data and column name got translated.

The question is
In Q1, Why did PRODUCT_DESCRIPTION did not got fully translated, Is this bcoz cognos does not have the same name in France?

In q2, Both data and column name got translated.

Thanks
saumil sanghvi

As I mentioned in my post, Cognos isn't translating anything. It's simply retrieving values based on the $runLocale variable. If you create a Framework Manager model and add support for multiple languages, each query subject and query item will have multiple name values - one for each of the included languages. Initially these will be set to the original name, appended with the language code - eg PRODUCT_DESCRIPTION(fr), PRODUCT_DESCRIPTION(ja) etc. If you replace these names in your model with the actual translated names, then you will see the translated names in your reports. If you don't replace them, you will see the default names. Cognos isn't translating things - it's just displaying the relevant names defined in your FM model.

In your scenario above, I'd guess that the items you used in your first report haven't had translated names added in your model, and the items you used in your second report have?

MF.
Meep!

saumil287

Hi MFGF,

Thank you for your reply.

I will look into the details about multilanguage.


Regards
saumil sanghvi





Lynn

Quote from: blom0344 on 28 Sep 2015 03:26:23 AM
This is a VERY OLD post.  :o   
The  # sq($runLocale  )# can be used to manipulate content. If you want to make headers multilingual, then use an expression within the column header instead of a fixed text. We got this to work with users with either Dutch, English or German runlocale settings. The runlocale will need to be set for each individual user.  Back then we used a bit of an SQL hack against the contentstore to enforce a setting for individual users

Hi Ties!
Happy to see you posting! Hope all is well in your new realm!
Lynn