debian-mirror-gitlab/spec/frontend/helpers/locale_helper.js
2019-05-18 00:54:41 +05:30

11 lines
284 B
JavaScript

/* eslint-disable import/prefer-default-export */
export const setLanguage = languageCode => {
const htmlElement = document.querySelector('html');
if (languageCode) {
htmlElement.setAttribute('lang', languageCode);
} else {
htmlElement.removeAttribute('lang');
}
};