StrataFrame Forum

Localizations for different users

http://forum.strataframe.net/Topic29634.aspx

By Jiri Brazda - 3/2/2011

Hi,

Is there any possibility to have different language for different users? When I log to an application under User1 account from computer1 and User2 account from computer2 both of them have Czech localization. But when User1 changes his language to English (MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1029Wink User2 has English texts too after the postback.

Any solution, please?

Thanks

Jiri
By Jiri Brazda - 3/6/2011

Hi,

can anybody give me a short answer, please? I hope that this scenario is not so unusual....

Thanks

Jiri
By Jiri Brazda - 3/8/2011

Hi,

I'm really wondering - nobody can tell what to do?

Unsure
By Keith Chisarik - 3/8/2011

I am sorry, I have not localized a web app to help you. I am sure a developer will be along....
By Trent L. Taylor - 3/9/2011

This gets pulled from the MessageLocaleID set in the application start up.  So generally, when using this, it applies to the application pool instead of the session.  However, there are some things that you can do.  The first, you will need to control the locale ID by using the "Retrieve..." methods to pull the localization messages:

MicroFour.StrataFrame.UI.Localization.RetrieveTextValue("yourKey")


You can then store the locale ID in a session variable instead of using the core application logic to pull this.  One thing that I have done before is subclass a label, etc. and have it look at the session variable that stores the locale ID and the pulls it and sets the label.  This allows you to use the localization engine, but takes the setting of the label out of the frameworks hands and lets you manipulate this to your needs.  That is why these methods are exposed.

Hope this helps.  Wink
By Jiri Brazda - 3/13/2011

Hi Trent,

thank You for the tip, I have done it as You proposed and it works fine.

Best regards

Jiri
By Trent L. Taylor - 3/14/2011

Glad it helped! Smile