I have tested with different people and from my understanding the best way to determine the language for my site on Internet Explorer is by using systemLanguage
But I have found an issue.
One of the testers has this languages in the Internet Options
The default language is English (the first), which is correct but the browser detects the second language and get's the German.
Can someone explain me how do I retrieve the default (first) language from that list? Why IE displays German instead of English? At least it should be an array.
My code:
var lang = window.navigator.systemLanguage || window.navigator.language;
if (lang.indexOf('-') !== -1) {
lang = lang.substr(0, lang.indexOf('-'));
}