Skip to content

Commit

Permalink
Merge 0a293ae into bccf632
Browse files Browse the repository at this point in the history
  • Loading branch information
ylavoie committed Jul 27, 2023
2 parents bccf632 + 0a293ae commit c745973
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions UI/src/i18n.js
Expand Up @@ -51,12 +51,14 @@ export async function setI18nLanguage(lang) {
}
}
if ( i18n.global.locale.value !== locale ){
document.querySelector("html").setAttribute("lang", locale);
if (rtlDetect.isRtlLang(locale)) {
document.querySelector("html").setAttribute("dir", "rtl");
}
i18n.global.locale.value = locale;
}
document.querySelector("html").setAttribute("lang", locale);
if (rtlDetect.isRtlLang(locale)) {
document.querySelector("html").setAttribute("dir", "rtl");
} else {
document.querySelector("html").removeAttribute("dir");
}
return nextTick();
}

Expand Down

0 comments on commit c745973

Please sign in to comment.