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>
This commit is contained in:
memoclaw 2026-03-20 19:17:30 +08:00 committed by GitHub
parent ff32869d2f
commit be00abe852
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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;
};