In a multilingual application, the following things / behavior are expected:
- Get the right resources for registered users.
- Sorting strings should be in accordance with the user's language (for example: in the case of Swedish users, the Swedish alphabets should appear after z in order).
- Validation of the date format must be performed in accordance with the language of users. (For example: fr-FR users can enter dd / mm / yyyy, and US users can enter mm / dd / yyyy)
- Repetition of the decimal validation should occur in accordance with the language of users (for example: 12.5 is valid in French, while 12.5 is not valid)
Now the question is how best to deal with this.
Approach 1:
- Set the page culture and UICulture page so that the App_GlobalResources files are matched and the decimal values ββin the grid are formatted correctly.
- Write your own validation methods for the following
- Create your own string sorting processing method.
Approach 2:
- Set the current thread culture and let it handle the following {Does every web application user have an established culture in this case?}
Approach 3:
Initialize the globalization attribute in web.config and allow the application selection 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 we should approach the solution of such problems or the pros and cons of the above approaches.
source share