nuxt-modules / i18n

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

navigateTo without locale prefix resets locale to default #3041

Open goela268 opened 1 month ago

goela268 commented 1 month ago

Environment


Reproduction

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-v5tzb6?file=app.vue

Describe the bug

If you navigate to a different page using navigateTo the selected locale is ALWAYS reset to defaultLocale. Example: You get redirected `example.com/' (no prefix). Language is reset to the default one.

However, if you are currently on example.com/nl, and navigate to example.com by adjusting the url (so essentially removing the prefix), the selected language is kept, as I would expect.

Additional context

No response

Logs

No response

BobbieGoede commented 1 month ago

However, if you are currently on example.com/nl, and navigate to example.com by adjusting the url (so essentially removing the prefix), the selected language is kept, as I would expect.

I don't understand, are you saying you expect example.com to show nl translations when navigating to it from example.com/nl?