DEV Community

Discussion on: Using i18Next with Svelte

Collapse
 
mawoka profile image
Mawoka

How do I auto-detect the language of the user and set it to this language?

Collapse
 
sbelzile profile image
Sébastien Belzile

There are multiple ways to do this:

You may use i18next language detector, this will probably meet your requirements and will take 5 mins to leverage.

If you are looking for a more browser native solution, have a look at the navigator.language API. You could easily script something from there.