Closed Enalmada closed 6 years ago
The default language is hard coded in the I18nModule.
In JS you can get the user language with:
navigator.language || navigator.userLanguage
So you have multiple possibilities to change the language:
setLanguage
action from anyware from your codesetLanguage
action based on the selected languageBased on the selected front end implementation, an Accept-Language
header must also be propagated to the backend.
My project serves multiple languages so seeing international support in this sample really tipped me over the edge to try it. When I started it up, it was not in English despite my browser is set "english". I can see that there seems to be english message capability in the code, so I am just a bit concerned at how the language detection works for users around the world.
My Chrome browser is probably sending en-US and I am just guessing that this project is hardcoded to look for something else but I couldn't find it. Thoughts?