From f96c3c9e11f1aab8b13c8c11340daef5077ecb98 Mon Sep 17 00:00:00 2001 From: panc Date: Mon, 9 Feb 2026 16:08:28 +0800 Subject: [PATCH] fix(projects): ensure HTML lang attribute is updated when setting locale --- src/locales/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/locales/index.ts b/src/locales/index.ts index a78d054b..e9153cb6 100644 --- a/src/locales/index.ts +++ b/src/locales/index.ts @@ -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 {