mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
优化国际化支持:移除动态加载语言文件的代码,简化语言设置逻辑
This commit is contained in:
@@ -46,9 +46,6 @@ export function getBrowserLocale(): SupportedLocale | null {
|
|||||||
* 设置i18n语言环境
|
* 设置i18n语言环境
|
||||||
*/
|
*/
|
||||||
export async function setI18nLanguage(locale: SupportedLocale) {
|
export async function setI18nLanguage(locale: SupportedLocale) {
|
||||||
// 加载语言文件(如果使用动态导入)
|
|
||||||
// await loadLocaleMessages(i18n, locale)
|
|
||||||
|
|
||||||
// 更新 i18n 实例语言
|
// 更新 i18n 实例语言
|
||||||
i18n.global.locale.value = locale as any as any
|
i18n.global.locale.value = locale as any as any
|
||||||
|
|
||||||
@@ -57,8 +54,6 @@ export async function setI18nLanguage(locale: SupportedLocale) {
|
|||||||
|
|
||||||
// 更新 HTML 标签 lang 属性
|
// 更新 HTML 标签 lang 属性
|
||||||
document.querySelector('html')?.setAttribute('lang', locale)
|
document.querySelector('html')?.setAttribute('lang', locale)
|
||||||
|
|
||||||
return nextTick()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user