top | item 29669509

(no title)

TheHippo | 4 years ago

Don't determine the users language by the country the request is coming from. My browser wants English, despite me being in Germany, so don't show me the German page. The good thing though was that besides the language selector nothing else was translated.

discuss

order

niftylettuce|4 years ago

It actually doesn't determine it by the country the request is coming from.

How it works is fully documented here: https://github.com/ladjs/i18n#i18nmiddlewarectx-next

1) Check URL (e.g. if /de or /de/ then it's a de locale - as long as de is a supported locale)

2) Use the custom function (if provided by the detectLocale parameter) for locale detection

3) Check the "locale" cookie value (or whatever the cookie option is defined as)

4) Check Accept-Language header

Regarding nothing being translated, there was an issue with our locales folder sync and that's being resolved soon!