Skip to content

Instantly share code, notes, and snippets.

@DanAntFerrari
Last active December 18, 2015 07:29
Show Gist options
  • Save DanAntFerrari/5747274 to your computer and use it in GitHub Desktop.
Save DanAntFerrari/5747274 to your computer and use it in GitHub Desktop.
Check browser Language on IE and Firefox
var l_lang;
if (navigator.userLanguage) {
// Explorer
l_lang = navigator.userLanguage;
}
else if (navigator.language){
// FF
l_lang = navigator.language;
}
else{
//se non riconosciuto
}
//or just use
//var lang = navigator.language || navigator.userLanguage;
//more info at http://www.metamodpro.com/browser-language-codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment