document.documentElement.lang = navigator.language;
Ask Jason