You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Figuring out how to set the fallbackLocale seems to be a quite common question and point of confusion (happened to myself just now and checked on the nuxt discord). It feels very natural to want to stick that property into nuxt.config and not create a seperate i18n.config.ts.
I'd like to propose the addition of that setting to the possible settings to the i18n object in nuxt.config. (If this has been asked and denied earlier then I apologize, couldn't find an issue though).
We're dealing with ~10 layer apps that extend off of a shared nuxt layer in a monorepo and adding 10 i18n.config files feels like an suboptimal solution for something that could also be achieved with a single line of code.
Thanks!
Additional information
Would you be willing to help implement this feature?
Could this feature be implemented as a module?
Final checks
Read the contribution guide (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).
You're right, the configuration split between vue-i18n options and module specific options have clearly been a point of confusion.
I'm open to suggestions on how to improve/clarify this while taking into account the reasoning behind moving vue-i18n options to a separate file. I think the main issue was that vue-i18n configuration can contain non-serializable values such as functions, which we worked around using code generation.
I was also struggling with this and needed quite some time to figure it out. I expected the config to work like it does for many other modules I have worked with. Configuration either in the nuxt.config or in an extra config file. But here it happens in two places.
Before any code changes I suggest to update the documentation and clarify following points:
The difference/relation between nuxt/i18n & vue/i18n. If one hasn't worked with them it is confusing.
Highlight what is nuxt/i18n config and what is vue/i18n config
Describe the feature
Figuring out how to set the
fallbackLocale
seems to be a quite common question and point of confusion (happened to myself just now and checked on the nuxt discord). It feels very natural to want to stick that property intonuxt.config
and not create a seperatei18n.config.ts
.I'd like to propose the addition of that setting to the possible settings to the i18n object in
nuxt.config
. (If this has been asked and denied earlier then I apologize, couldn't find an issue though).We're dealing with ~10 layer apps that extend off of a shared nuxt layer in a monorepo and adding 10 i18n.config files feels like an suboptimal solution for something that could also be achieved with a single line of code.
Thanks!
Additional information
Final checks
The text was updated successfully, but these errors were encountered: