Default Localization

Stimulsoft Reports.NET discussion
Post Reply
Andreas Tastler
Posts: 63
Joined: Fri Jul 17, 2009 5:00 am
Location: St. Gallen, Switzerland

Default Localization

Post by Andreas Tastler »

Hi all

Which Localization will be used when the user selects the menu item Select UI Language --> Default?
Is it possible to set the default localization in code?
I want to preset (default) the localization, so it matches the language setting of our application.
But the user should be able to override this and selects another language, which will be saved.


Thank you

Andreas
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Localization

Post by Edward »

Hi Andreas,

Default localisation depends on the default culture. You could change it as follows:

Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");

And if the user changes localization in the designer menu then next time he loads the designer, the last chosen localisation will be used.

Thank you.
Andreas Tastler
Posts: 63
Joined: Fri Jul 17, 2009 5:00 am
Location: St. Gallen, Switzerland

Default Localization

Post by Andreas Tastler »

Hi Edward

It works. Thank you very much.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Localization

Post by Edward »

Hi Andreas,

Please let us know if you need any help.

Thank you.
guillaume
Posts: 2
Joined: Thu Nov 05, 2009 3:23 am
Location: France

Default Localization

Post by guillaume »

Hi Edward,

Shouldn't UI language rely on Thread.CurrentThread.CurrentUICulture ?
Thread..::.CurrentUICulture Property

Gets or sets the current culture used by the Resource Manager to look up culture-specific resources at run time.
Regards,
Guillaume
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Default Localization

Post by Jan »

Hello Guillaume,

Stimulsoft Reports check following property for default localization:

CultureInfo.CurrentCulture.Name

Thank you.
Post Reply