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', },