2017-12-12 11:39:31 +00:00
|
|
|
/* eslint-disable import/prefer-default-export */
|
|
|
|
|
2018-10-17 07:13:26 +00:00
|
|
|
export const setLanguage = languageCode => {
|
2017-12-12 11:39:31 +00:00
|
|
|
const htmlElement = document.querySelector('html');
|
|
|
|
|
|
|
|
if (languageCode) {
|
|
|
|
htmlElement.setAttribute('lang', languageCode);
|
|
|
|
} else {
|
|
|
|
htmlElement.removeAttribute('lang');
|
|
|
|
}
|
|
|
|
};
|