Update the lang
attribute with the current lang. (#2995)
Currently, when changing the app language, the `lang` attribute still in `en`.
This commit is contained in:
parent
9c51ba6067
commit
8a63187d4f
@ -61,6 +61,7 @@ let currentLangData = {};
|
|||||||
export const setLanguage = async (lang: Language) => {
|
export const setLanguage = async (lang: Language) => {
|
||||||
currentLang = lang;
|
currentLang = lang;
|
||||||
document.documentElement.dir = currentLang.rtl ? "rtl" : "ltr";
|
document.documentElement.dir = currentLang.rtl ? "rtl" : "ltr";
|
||||||
|
document.documentElement.lang = currentLang.code;
|
||||||
|
|
||||||
currentLangData = await import(
|
currentLangData = await import(
|
||||||
/* webpackChunkName: "i18n-[request]" */ `./locales/${currentLang.code}.json`
|
/* webpackChunkName: "i18n-[request]" */ `./locales/${currentLang.code}.json`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user