feat(i18n): 优化国际化配置并启用浏览器语言检测- 启用浏览器语言检测功能
This commit is contained in:
parent
3205ecd547
commit
231ae8fa37
@ -56,7 +56,13 @@ export default defineNuxtConfig({
|
|||||||
locales: currentLocales,
|
locales: currentLocales,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
strategy: 'no_prefix',
|
strategy: 'no_prefix',
|
||||||
detectBrowserLanguage: false,
|
detectBrowserLanguage: {
|
||||||
|
useCookie: true,
|
||||||
|
cookieKey: 'i18n_redirected',
|
||||||
|
redirectOn: 'root',
|
||||||
|
alwaysRedirect: true,
|
||||||
|
fallbackLocale: 'zh-CN'
|
||||||
|
},
|
||||||
defaultLocale: 'zh-CN',
|
defaultLocale: 'zh-CN',
|
||||||
vueI18n: './i18n/i18n.config.ts',
|
vueI18n: './i18n/i18n.config.ts',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user