From 231ae8fa37f7306d0c8f27925736899ffce8a635 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Tue, 25 Feb 2025 19:17:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20=E4=BC=98=E5=8C=96=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=85=8D=E7=BD=AE=E5=B9=B6=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E8=AF=AD=E8=A8=80=E6=A3=80=E6=B5=8B?= =?UTF-8?q?-=20=E5=90=AF=E7=94=A8=E6=B5=8F=E8=A7=88=E5=99=A8=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E6=A3=80=E6=B5=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nuxt.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nuxt.config.js b/nuxt.config.js index 44d2a80..9563231 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -56,7 +56,13 @@ export default defineNuxtConfig({ locales: currentLocales, lazy: true, strategy: 'no_prefix', - detectBrowserLanguage: false, + detectBrowserLanguage: { + useCookie: true, + cookieKey: 'i18n_redirected', + redirectOn: 'root', + alwaysRedirect: true, + fallbackLocale: 'zh-CN' + }, defaultLocale: 'zh-CN', vueI18n: './i18n/i18n.config.ts', },