Skip to content

Navigation links with locale #4579

Description

@oscar-b

Steps to reproduce

Steps:

  1. Open this link to live example: (required)

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 use getPathname() from next-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 a href instad of a segment.

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: navigation, locale, react-intl, internationalization

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions