2020-12-23 16:10:24 -05:00
|
|
|
export const setLanguage = (languageCode) => {
|
2019-03-28 15:07:40 -04:00
|
|
|
const htmlElement = document.querySelector('html');
|
|
|
|
|
|
|
|
if (languageCode) {
|
|
|
|
htmlElement.setAttribute('lang', languageCode);
|
|
|
|
} else {
|
|
|
|
htmlElement.removeAttribute('lang');
|
|
|
|
}
|
|
|
|
};
|