nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.65k stars 465 forks source link

Ability to disable default locale loading if actual locale is present #2997

Open zumm opened 5 days ago

zumm commented 5 days ago

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

Final checks