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: {
locales: [
{
code: 'en-US',
iso: 'en-US',
name: 'English (United States)',
file: 'en-US.json',
},
],
strategy: 'no_prefix',
lazy: true,
langDir: 'locales',
defaultLocale: 'en-US',
strategy: 'no_prefix',
defaultLocale: 'en',
locales: [
{
code: 'en',
iso: 'en',
name: 'English (United States)',
file: 'en.json',
},
],
},
colorMode: {
preference: 'system',