debian-mirror-gitlab/spec/frontend/helpers/locale_helper.js
2020-11-24 15:15:51 +05:30

9 lines
233 B
JavaScript

export const setLanguage = languageCode => {
const htmlElement = document.querySelector('html');
if (languageCode) {
htmlElement.setAttribute('lang', languageCode);
} else {
htmlElement.removeAttribute('lang');
}
};