Strategy "prefix" doesn't redirect on root page

commented a year ago

Hello guys,

I'm using the strategy 'prefix' to get all my paths prefixed with /en or /fr languages and my defaultLocal is set to "en".

Everything works fine when I'm trying to access to http://localhost:3000/ on a french based navigator : http://localhost:3000/ redirects to http://localhost:3000/fr.

But if I use EN as default language for my navigator, there is no redirect and root page shows 404 page error. Btw, accessing to http://localhost:3000/en directly is working.

Here is my nuxt-i18n config :

[ 'nuxt-i18n', { locales: [ { code: 'en', iso: 'en' }, { code: 'fr', iso: 'fr' } ], defaultLocale: 'en', vueI18n: { fallbackLocale: 'en' }, strategy: 'prefix', detectBrowserLanguage: { useCookie: false, cookieKey: 'i18n_redirected' } } ],,

Why is the root page not redirecting to http//:localhost:3000/en when using an english based language ?

Question โ€ข Unresolved
#c133 - Created a year ago