Open jorgemoya opened 2 weeks ago
Thanks for the report! I'm currently working on a re-implementation of the navigation APIs in https://github.com/amannn/next-intl/pull/1316 in order to address some long-standing issues. I think the issue you've reported can be solved too as part of that, I've put this on my list!
This is currently my top priority, I'll keep you updated!
Description
When using locale prefix
as-needed
, I would expectredirect
to respect this configuration, instead it will append default locale. This is not how usingLink
behaves, so it is unexpected. For non default locales, I would expect forredirect
to append locale prefix.Verifications
Mandatory reproduction URL
https://next-intl-redirect-issue-of1rlux37-jorgemoyas-projects.vercel.app/
Reproduction description
Steps to reproduce:
Click to redirect
Expected behaviour
The expected behavior would be to respect the
as-needed
locale prefix configuration and for navigation within the default locale to ignore appending locale, much like using theLink
component. For non default locales it would be fine to append locale prefix.