bccsa / luminary

Offline-first content platform
Apache License 2.0
3 stars 2 forks source link

APP: Language routing to default browser language for new users #321

Open laurensgroeneveld opened 1 month ago

laurensgroeneveld commented 1 month ago

We noticed while testing the RelatedContent component in #174 that the appLanguageIdAsRef 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?

ivanslabbert commented 3 weeks ago

Language is not routing to English for new users. It seems to route to the newest added language (Chichewa in this case) Image

ivanslabbert commented 3 weeks ago

Some reading and ideas on setting the language: https://dev.to/bitdweller/stop-setting-the-language-of-your-website-based-on-my-location-31h0

ivanslabbert commented 2 weeks ago

Discussed during the standup meeting: