Hi Team,
In order to provide multi-culture support, we must format the numbers
and datetime data as per the user's locale. For example, when a french
user selects the UI language as English, he/she must still see the
numbers and datetime in french format.
The user's locale may be obtained in two ways:
1. Fetch the language setting of user's browser:
This approach involves fetching the language setting of user's browser
either by using 'accept-language' header that is sent to the server or
navigator.language
2. Have another drop down menu for user's locale:
This approach involves having two drop down menus, one for the
translation language and another for the locale. The locale drop down
menu can contain languages that may or may not be included in the
translation language drop down menu. By default, the language selected
in the translation drop down can be selected in the locale drop down as
well.
However, the first approach is not reliable and may vary from one
browser to another (some may not support navigator method). So I would
prefer the second approach.
Any thoughts or comments?
Regards
Pooja