i18n
i18n copied to clipboard
Ability to disable default locale loading if actual locale is present
Describe the feature
We using lazy load to fetch messages from backend. Our project is available in two locales, so fetching default locale aswell as current kills entire reason behind lazy loading.
Ofc it's possible to not set defaultLocale, but problem is our desired default locale is not en.
I'm not sure fetching defaultLocale even if actual locale is present is intended behiviour, so there is reporoduction: https://stackblitz.com/edit/nuxt-starter-bnxebz?file=app.vue
npm run build npm run preview
Change locale to ru by pressing button, then reload the page. As you can see in console both locales are fetched.
Additional information
- [X] Would you be willing to help implement this feature?
- [ ] Could this feature be implemented as a module?
Final checks
- [X] Read the contribution guide (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).
- [X] Check existing discussions and issues.