martinkr/next-export-i18n

Make Language autodétection optional

martinkr opened this issue · 1 comments

Thanks for the explanation! I understand how it works, but what happens if:

  1. I provide translations for English and Balinese (just for the sake of this example).
  2. The website is mostly targeted towards people who speak Balinese, so I set the default language to Balinese.
  3. There's no Balinese language support in most browsers, so users are likely to use another language for the browser (e.g. English).
  4. Now the default language of the website for the users becomes English, which is not what I'm aiming for.

This also happens if the user just happens to be using the browser in English (e.g. the browser comes preinstalled with the laptop, and it's set to English) and they're not tech-savvy enough to know how to change it.

Originally posted by @laymonage in #9 (comment)

Implemented in 1.4.0

The config-file has an additional option useBrowserDefault now. Set this to false to forcefully overwrite the browser's default language with the one set in the config.