It’s ok to change the lang property directly and you may do so changing the value of
document.documentElement.lang
For example:
var newLang = 'fr';
...
document.documentElement.lang = newLang; // will set the lang property to 'fr'
It’s ok to change the lang property directly and you may do so changing the value of
document.documentElement.lang
For example:
var newLang = 'fr';
...
document.documentElement.lang = newLang; // will set the lang property to 'fr'