Replies: 1 comment 2 replies
-
That's a great point! For the time being, you could implement this in user land, but I think that would be desirable in → #904 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Using your middeware with pathnames set up like this:
works really well when I'm trying to access translated paths like
http://localhost:3000/lv/jautajumi/
🙌There is just one issue --
http://localhost:3000/lv/faq/
remains accessible too! This is not ideal because there are duplicate pages from the SEO standpoint.What I'd like to see is that only the translated
lv
andru
links are available, while the English versions that are used as directory names in the App router and as keys in code (about
,contacts
,faq
, etc.) return 404. e.g.:/ru/voprosi/
-> renders Russian content/voprosi/
-> adds the default prefix which is lv so path/lv/voprosi/
renders 404/lv/jautajumi/
-> renders Latvian content/jautajumi/
-> adds the default prefix which islv
and renders Latvian content/lv/faq/
-> renders 404/ru/faq/
-> renders 404/faq/
-> either adds a default prefix which islv
and renders 404 or just renders 404 right awayCan this be done?
Adding my folder structure for reference in case it helps:

Beta Was this translation helpful? Give feedback.
All reactions