From 8a63187d4f8507f106a4b2419f0676a88c8a5667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20dBruxelles?= <18559798+jdbruxelles@users.noreply.github.com> Date: Mon, 8 Feb 2021 11:38:38 +0100 Subject: [PATCH] Update the `lang` attribute with the current lang. (#2995) Currently, when changing the app language, the `lang` attribute still in `en`. --- src/i18n.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n.ts b/src/i18n.ts index 8b493680..4b3ae5f2 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -61,6 +61,7 @@ let currentLangData = {}; export const setLanguage = async (lang: Language) => { currentLang = lang; document.documentElement.dir = currentLang.rtl ? "rtl" : "ltr"; + document.documentElement.lang = currentLang.code; currentLangData = await import( /* webpackChunkName: "i18n-[request]" */ `./locales/${currentLang.code}.json`