js get document language code example Example: js change html lang document.documentElement.lang = lang;