Hello there ! hope you’re doing well.
I’m using a JS plugin to translate pages of my website.
The script translates pages onload to french, what I want is for the script to translate based on the country, more specifically, I want the script to be able to translate to French for users from France and to English for all other users. I’ve seen a good post on SO about using
navigator.languages using the following code:
var userLang = navigator.language || navigator.userLanguage; alert ("The language is: " + userLang); </script>
I hope I can get some help.