Reputation: 524
The following things/behaviors are expected in multi lingual application.
Now the question is what is the best way to handle this.
Approach 1:
Approach 2:
Approach 3:
Initialize the globalization attribute in web.config and letting the application pick culture based on the user’s browser culture
<globalization uiculture="auto" culture="auto" enableClientBasedCulture =”true”/>
Please let me know if there are better alternatives and how should we approach solving such problems or the pros and cons of the above approaches.
Upvotes: 4
Views: 2787
Reputation: 4084
Overload the InitializeCulture() page event. Use a session var based on the autheticated user, which stores the currentliy selected culture and reset both Thread.Culture and UICulture in the event handler.
As far as I know, these conversion issues or ToString() format issues should no exist. The current thread culture will handle all for you.
Some resources:
Walkthrough: Using Resources for Localization with ASP.NET
How to: Set the Culture and UI Culture for ASP.NET Web Page Globalization
Upvotes: 2