Closed grzegorztomasiak closed 3 months ago
Would you be able to provide a reproduction? 🙏
The defineI18nConfig
is meant for vue-i18n
specific options, have you configured locales in the i18n
option in nuxt.config.ts
? These will be applied to vue-i18n
options as well.
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
modules: ['@nuxtjs/i18n'],
i18n: {
locales: ['en', 'fr'],
vueI18n: './i18n.config.ts'
}
})
holy cow, now it works. I will leave the locales in nuxt.config.js only. Thank you!
Any shared options you only need to configure in nuxt.config
, these will be applied to vue-i18n
as well. The vueI18n
config file simply accepts all vue-i18n
configurations including those we handle as well.
We're considering merging these options in the next major version so this can configured in one place if possible 😄 (difficulties are serialization of certain properties)
Environment
Reproduction
no reproduction given.
Describe the bug
I can't find anything on the web regarding the issue I have, I followed the docs many times and still no luck.
When I use
<NuxtLink :to="localePath('index', 'fr')">Homepage in FR</NuxtLink>
the localePath does not generate any url, in fact it's null in the console and null and<a>
tag does not contain href property.and i18n configuration
Anyone has idea why?
Additional context
No response
Logs
No response