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

[Docs]: It is not clear to add pathnames to middleware file if you want to use localized pathnames #1174

Closed
qublaidev opened this issue Jul 7, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation unconfirmed Needs triage.

Comments

@qublaidev
Copy link

Link to page

https://next-intl-docs.vercel.app/docs/routing#pathnames

Describe the problem

I followed the docs in tutorial about localized pathnames and created the navigation.ts and middleware.ts files accordingly but when testing the localized paths returned 404.

The solution was under the localized pathnames revalidation accordion tab showing that you should add pathnames to next-intl middleware.

It would be more clear if it is shown in the actual section not under a tab

@qublaidev qublaidev added documentation Improvements or additions to documentation unconfirmed Needs triage. labels Jul 7, 2024
@amannn
Copy link
Owner

amannn commented Jul 8, 2024

This is covered right at the beginning of the routing page: Shared configuration.

I do agree though that it's currently too easy to provide configuration either only to the navigation APIs or the middleware. I'm working on a small API revamp in #779 that should help with this in the future.

Thanks for raising this!

@amannn amannn closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants