fix(projects): ensure HTML lang attribute is updated when setting locale

This commit is contained in:
panc
2026-02-09 16:08:28 +08:00
committed by Soybean
parent a37949f2af
commit f96c3c9e11

View File

@@ -23,6 +23,8 @@ export const $t = i18n.global.t as App.I18n.$T;
export function setLocale(locale: App.I18n.LangType) {
i18n.global.locale.value = locale;
document?.querySelector('html')?.setAttribute('lang', locale);
}
export function getLocale(): App.I18n.LangType {