All Mod Cons (Multilingual Reports with AS2005)


Based on feedback from a couple of folks, I’ve decided to make my post titles a bit more descriptive. I’ll still use the name of one of the albums in my music collection as the primary title but will also include a description of the actual content of the post (happy, Jason?).


Anyway, one of the cool new features of SQL 2005 Analysis Services is translations. This lets you provide language translations for both the data and the metadata in your cube. When an application connect to the server, it can provide the Locale ID (LCID) of the desired language in the connection string. If the translation is not done, it will use the default one.


To get this working, provide a parameter that allows you to select the language. You could just as easliy bind it to the User!Language global to get the language of the current users. One of the tricks is that Reporting Services uses Language names instead of LCIDs. I had to write a custom function to translate between them:

Public Function GetLCID(Name As String) As Integer
 Dim CI As New System.Globalization.CultureInfo(Name)
 Return CI.LCID
End Function


I first designed the report using English and then switched to use the GetLCID function in the connection string.


=”Data Source=localhost;Initial Catalog=””Adventure Works DW””;Locale Identifier=” & Code.GetLCID(Parameters!Language.Value)


Unfortunately, this only works for the data, not the static text. You would need to write some additional custom expressions for the report text. But it should give you a feel for how to leverage this feature in your own reports.


 

Comments (7)

  1. Jacque Murrell says:

    Brian, when I click on the RDL source hyperlink, it gives me an error message: This page cannot be found. I’d really like to explore doing localization via the RDL since I tend to do a fair share of report localization (the hard way).

    Thanks,

    Jacque

  2. Jess says:

    Hi, I am new to Reporting Service and .NET framework.

    I understand that .NET provide a localisation using by creating one resource file for each language.

    Is it possible to make use of this feature to localisation foprovide a better r static text in Reporting Service? If yes, how?

    Thanks,

    Jess

  3. Ethem Azun says:

    Hi,

    Are there any plans to include a resource based mechanism for localizing the rdl meta data maybe in a future service pack?

    Thanks,

    Ethem Azun

  4. bwelcker says:

    Dynamic report localization is a feature that we would like to add in a future release. Not sure when it will fit.

  5. Aranda says:

    Hi, I am trying to use this feature in an OLE DB connection with Provider=MSOLAP.3. If I hard code the Locale Identifier into the connect string, all works as it should, but when I convert it to an expression, simply wrapping the string in quotes and pre-pending an equals, I get an error:

    An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC32017] Comma, ‘)’, or a valid expression continuation expected.’.

    Do expression based connections not work with OLE DB?

  6. Alok says:

    I am working to develop cube which can be language Indepandant. Can i do that?? I have one view with a column Language Id which Contains same record with different Langiage ID. When any user log in  my application with LanguageID say GB then the cube should my dimensions in english and if user log in with say TH then the cube should show dimension in Thai Language.

  7. bwelcker says:

    Alok, this is exactly what was described above.

Skip to main content