javascript get user language code example
Example 1: javascript get user preferred language
//detect the language preference of the user's browser
var userLanguage = window.navigator.userLanguage || window.navigator.language;
Example 2: get user language js
var language = window.navigator.userLanguage || window.navigator.language;
alert(language); //works IE/SAFARI/CHROME/FF