Open laurensgroeneveld opened 1 month ago
Language is not routing to English for new users. It seems to route to the newest added language (Chichewa in this case)
Some reading and ideas on setting the language: https://dev.to/bitdweller/stop-setting-the-language-of-your-website-based-on-my-location-31h0
Discussed during the standup meeting:
navigator.languages || navigator.userLanguages
to get the list of browser languages and set the app language to the first match (if not already user-selected). If none of the available app languages are available, set it to the default language (see next point)
We noticed while testing the
RelatedContent
component in #174 that theappLanguageIdAsRef
defaults to an empty string. This leads to unexpected behaviour when fetching the posts, as it will check for the current language, which doesn't exist.The workaround for this is to set it manually, but this feels errorprone and a gotcha that people will run into in the future. Should we rather default to
lang-eng
for the language?And it might be good to check this in the browser. Does it correctly default to English there for people that have never opened the site?