Page 1 of 1

Globalisation to display report in one of several languages

Posted: Tue May 31, 2016 3:36 am
by mihiri2
Hi,

I have three cultures (Arabic [ar], Chinese (Simlified)[zh-CHS], Catalan[ca]) added on Globalization editor.

My OS primary culture is en-US.

What I try to do is in Report Begin Rendering event to do following

string cultureName = "ar";
this.LocalizeReport(new CultureInfo(cultureName));

I was expecting, this would force the report to display in Arabic. Unfortunately it still seems to be picking up the culture from OS.

Is it possible to do what I am trying to do above?

Thanks

Regards

Mihiri

Re: Globalisation to display report in one of several langua

Posted: Tue May 31, 2016 10:24 am
by HighAley
Hello, Mihiri.

If you use the Globalization Editor, than it's possible to localize the report before compilation only.
Please, set localization before compilation of the report or you could use the Globalization Manager.

Thank you.

Re: Globalisation to display report in one of several langua

Posted: Wed Jun 01, 2016 1:04 am
by mihiri2
Hi HighAley,

Thanks for the reply.
1."set localization before compilation of the report-"

How do I do this. I already tried in Report Begin Rendering event to do following
string cultureName = "ar";
this.LocalizeReport(new CultureInfo(cultureName));

Which doesn't work and report still displays OS primary culture which is en-US.


2. Using GlobalizationManager:

can you please explain in detail what is "GlobalizedReport.MyResources"? Is it a namespace?

report.GlobalizationManager = new GlobalizationManager("GlobalizedReport.MyResources", new CultureInfo(cultureName));
Thanks

Re: Globalisation to display report in one of several langua

Posted: Wed Jun 01, 2016 1:04 pm
by HighAley
Hello, Mihiri.

1. It's impossible to do this in the Begin Rendering event because at this moment the report is already compiled.

2. The GlobalizedReport.MyResources is the resource file.
You could find a sample project on the GitHub.

Thank you.