I'm using navigator.language to detect the language set on the device
and display my app in that language, if possible.
My app is available in 3 languages: English, German and French.
Now obviously I am looking for "en-us", "de-de" and "fr-fr", and just
fallback to English if none of these languages where detected, but I'm
wondering if in some cases it could also say "en-gb" (for GB devices),
"de-ch" (for Swiss devices) or "de-at" (for Austrian devices).
Does anyone have any further information on that topic?
Thanks,
basically I'd recommend you to detect just the first bit and chose
language based on that, there might be many different dialects/
variations you could skip unintentionally so I guess just testing the
'root' language would be the best bet
regards
Tom
Here's how I got it working:
language = navigator.language.split("-");
language_root = (language[0]);
Regards
On 2 Feb., 18:45, Thomas <tomasztu...@gmail.com> wrote:
> You can read on it more over herehttp://www.langtag.net/<-