-
DescriptionI'm creating a website and want to localize urls directly, therefore i dont need locale prefixing. i'm using the next-intl/packages/next-intl/src/navigation/shared/BaseLink.tsx Lines 34 to 49 in 241c3ea with above code, having a Verifications
Mandatory reproduction URLReproduction descriptionI'm still working on a reproduction url, but i believe Expected behaviourWhen using |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
The reason why links to other locales have a locale prefix even though you're using Does this affect your app in any negative way or is this just something you've noticed and it looked like a bug? |
Beta Was this translation helpful? Give feedback.
-
Yes, it has a slightly negative impact because the goal is to have urls matching exactly the urls i set for SEO purpose not the ones with the prefixes, especially that i do not have those prefixes in the I still try to make a reproduction repo but it's a bit entangled with other libraries therefore it takes time to isolate. whould that behavior be disabled when i use |
Beta Was this translation helpful? Give feedback.
-
If SEO is important to you, how do you provide distinct pathnames per locale if you're using
Nope, that doesn't change this behavior. |
Beta Was this translation helpful? Give feedback.
-
i'm managing urls manually - the website is built with next and content-collections so i'm feeding slugs manually (similar to subdomain-based routing with a single domain) |
Beta Was this translation helpful? Give feedback.
-
If you're using a routing system that is external to I'm going to move this to a discussion since this seems to be more a usage question than a bug report. As explained above, the prefix that is shown when changing a locale serves a concrete purpose and is working as intended. |
Beta Was this translation helpful? Give feedback.
If you're using a routing system that is external to
next-intl
, maybe you'd have an easier time if you'd set up your app without i18n routing. Using that approach, you don't have to use either the middleware or the navigation APIs fromnext-intl
and also not the[locale]
segment. Maybe that puts you in a better place where you can implement your custom routing requirements.I'm going to move this to a discussion since this seems to be more a usage question than a bug report. As explained above, the prefix that is shown when changing a locale serves a concrete purpose and is working as intended.