From c68c3abb73df4c6691d01625275b516e82e60736 Mon Sep 17 00:00:00 2001 From: jingrow Date: Sun, 4 Jan 2026 00:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E8=AF=AD=E8=A8=80=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/i18n/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/shared/i18n/index.ts b/src/shared/i18n/index.ts index 857f5aa..14f732b 100644 --- a/src/shared/i18n/index.ts +++ b/src/shared/i18n/index.ts @@ -14,8 +14,8 @@ const messages = { 'en-US': {} // 英文使用key作为默认值 } -// 全局语言状态 - 默认英文 -export const locale = ref('en-US') +// 全局语言状态 +export const locale = ref('zh-CN') // 翻译函数 - 支持 t("自然英文") 语法 export function t(key: string) { @@ -45,9 +45,6 @@ export function initLocale() { const saved = localStorage.getItem('locale') if (saved && locales.some(l => l.code === saved)) { locale.value = saved - } else { - // 如果没有保存的语言,默认使用英文 - locale.value = 'en-US' } // 初始化时设置 HTML 的 lang 属性 if (typeof document !== 'undefined') {