Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accidentally changed the locale after navigating when setting "localePrefix" to "never" #1066

Closed
3 tasks done
3li7u opened this issue May 11, 2024 · 2 comments
Closed
3 tasks done
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@3li7u
Copy link

3li7u commented May 11, 2024

Description

I am using localePrefix: "never"
when I navigate from /home to /about and go back from /about to /home and the locale is en it works
the same when the locale is ar.
the problem comes after changing the locale and try navigating, it goes back to the previous locale.
e.g.

  1. en: /home --> ar: /home via locale switcher it works
  2. ar: /home --> ar: /about it navigate to en: /about

Verifications

  • I've verified that the problem I'm experiencing isn't covered in the docs.
  • I've searched for similar, existing issues on GitHub and Stack Overflow.
  • I've compared my app to a working example to look for differences.

Mandatory reproduction URL

https://next-intl-locale-prefix-never.vercel.app

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Click on AR
  3. Click on goto: About
  4. it will navigate to /about but with en locale instead of ar

Expected behaviour

It should navigate to the /about page with ar locale

@3li7u 3li7u added bug Something isn't working unconfirmed Needs triage. labels May 11, 2024
@3li7u
Copy link
Author

3li7u commented May 11, 2024

@amannn
Copy link
Owner

amannn commented May 13, 2024

Seems like there's been a regression on the Next.js side in one of the latest versions. This was reported before in #786, was fixed on the Next.js side but apparently broke again now.

I'll close this in favor of #786, thanks for the report! See also the linked issue for workarounds.

@amannn amannn closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants