mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2026-02-11 18:31:22 +08:00
fix(projects): ensure HTML lang attribute is updated when setting locale
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user