QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.3k stars 61 forks source link

Bug is Switching locale from page name which matches locale #162

Closed sikandarchishty closed 1 year ago

sikandarchishty commented 1 year ago

Describe the bug Relates to 109, when switching locale from a specific page it does not set the locale but changes when done in reverse (let me explain :-P).

To Reproduce Codesandbox

Expected behavior It should switch regardless of matching locale initials or not.

About (please complete the following information):

QuiiBz commented 1 year ago

That's strange because the eno page seems to work correctly when updating the locale. I suspect this is related to the default locale (passed as a second argument in createI18nMiddleware).

I'll take a look asap.

QuiiBz commented 1 year ago

I've fixed the issue in #164 and it will be part of the 1.0.0 release (#126) that will be released later today.