From be00abe852479820b7c574e15e276d70961ab7bd Mon Sep 17 00:00:00 2001 From: memoclaw Date: Fri, 20 Mar 2026 19:17:30 +0800 Subject: [PATCH] fix: sync html lang attribute with active locale (#5753) Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- web/src/utils/i18n.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/utils/i18n.ts b/web/src/utils/i18n.ts index 069d50de3..b96421a27 100644 --- a/web/src/utils/i18n.ts +++ b/web/src/utils/i18n.ts @@ -96,6 +96,7 @@ export const loadLocale = (locale: string): Locale => { const validLocale = isValidLocale(locale) ? (locale as Locale) : findNearestMatchedLanguage(navigator.language); setStoredLocale(validLocale); i18n.changeLanguage(validLocale); + document.documentElement.lang = validLocale; return validLocale; };