feat: i18n config

This commit is contained in:
Rafi
2023-02-15 18:20:49 +08:00
parent 5abd5edba5
commit 66767d9352
2 changed files with 9 additions and 8 deletions

View File

@@ -27,22 +27,19 @@ export default defineNuxtConfig({
'@nuxtjs/i18n'
],
i18n: {
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',
redirectOn: 'root', // recommended
alwaysRedirect: true
},
strategy: 'no_prefix',
locales: [
{
code: 'en',
iso: 'en-US',
name: 'English',
file: 'en-US.json',
},
{
code: 'cn',
code: 'zh-CN',
iso: 'zh-CN',
name: '简体中文',
file: 'zn-CN.json',
file: 'zh-CN.json',
}
],
lazy: true,