i18n: add i18n config file to setup fallback locale

This commit is contained in:
axolotle 2023-11-13 17:52:50 +01:00
parent 70403cc9f1
commit 266a1a8866
2 changed files with 14 additions and 10 deletions

4
i18n.config.ts Normal file
View file

@ -0,0 +1,4 @@
export default defineI18nConfig(() => ({
legacy: false,
fallbackLocale: 'en',
}))

View file

@ -33,18 +33,18 @@ export default defineNuxtConfig({
}, },
}, },
i18n: { i18n: {
locales: [ strategy: 'no_prefix',
{
code: 'en-US',
iso: 'en-US',
name: 'English (United States)',
file: 'en-US.json',
},
],
lazy: true, lazy: true,
langDir: 'locales', langDir: 'locales',
defaultLocale: 'en-US', defaultLocale: 'en',
strategy: 'no_prefix', locales: [
{
code: 'en',
iso: 'en',
name: 'English (United States)',
file: 'en.json',
},
],
}, },
colorMode: { colorMode: {
preference: 'system', preference: 'system',