COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: babu babu on 23 Nov 2010 07:43:36 PM

Title: Multi Language Reports
Post by: babu babu on 23 Nov 2010 07:43:36 PM
Hi,
I have the columns Product_en,Product_ge,product_fr etc.... how can i show the related data based on user login.Suppose if the user login with german it should fetch product_ge.please give me the solution.

Thanks!
Anand.
Title: Re: Multi Language Reports
Post by: blom0344 on 24 Nov 2010 03:43:51 AM
#sq($account.personalInfo.userName)#

returns the actual login (german) in a query,

So:


CASE #sq($account.personalInfo.userName)#
WHEN 'german' THEN [product_ge]
WHEN 'french' THEN [product_fr]
else
null END


A bit crude though..
Adding a table mapping login's to language preferences would be better.
Title: Re: Multi Language Reports
Post by: Lynn on 24 Nov 2010 07:22:19 AM
You might also look into the runLocale session parameter. If the values correspond to the column suffix then something like this might be what you want:

#'Product_'+ $runLocale#

If the contents of the runLocale don't exactly match the suffix then a parameter map would be needed (e.g., key en-us; value en). Then might be closer to what you're after:

#'Product_'+#$LocaleMap{$runLocale}#

Not sure I've got the syntax down exactly, but the general idea is covered in a number of ways in the FM user guide.