gitlab-org--gitlab-foss/spec/javascripts/helpers/locale_helper.js
2018-10-17 11:18:17 -05:00

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');
}
};