-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Navigation links with locale #4579
Comments
Hi, we plan to make the navigation items overridable in #4413 which might help solve this issue. But can you please share your navigation configuration or a reproduction if possible? |
@apedroferreira Hi! Thanks, you're right, I mis-diagnosed this a bit, the root issue was that I imported the default https://codesandbox.io/p/sandbox/upbeat-sammet-dlvrrn The nested links point to |
Ok, we have a release coming out right now that will change it to Unfortunately I can't access your reproduction, it seems like it's a permissions issue? |
Sorry, not used to Codesandbox, should be accessible now! |
Likely the same issue as #4556. Caused by the rendered |
Understood the issue now, it looks to be related to the way we build the paths from segments in a nested navigation. |
Steps to reproduce
Steps:
Current behavior
Links in the navigation points to
/admin
instead of/en/admin
, causing a full reload on navigation.Expected behavior
Links should take the active locale into consideration, for instance linking to
/en/admin
.Context
I'm trying to create navigation links with locales in the URL: https://nextjs.org/docs/app/building-your-application/routing/internationalization
The concept with
segment
for navigation makes it hard to for instance usegetPathname()
fromnext-intl
as a halper.I guess we'd need a way to change the navigation component that's used by
AppProvider
/DashboardLayout
, or being able to provide ahref
instad of asegment
.Your environment
npx @mui/envinfo
Search keywords: navigation, locale, react-intl, internationalization
The text was updated successfully, but these errors were encountered: