1

Next.js 14 using the new app router covers dynamic routes...

en/[slug]

...and routes for multiple languages:

[lang]/contact-us

One thing that is not covered anywhere is a combination of both. I want to have one route per language with an individual slug:

en/contact-us
de/kontakt
fr/contactez-nous

I would like to avoid having to create a page (page.tsx) for each language, but instead route everything via the same page if possible:

[en/en/fr]/[contact-us|kontakt|contactez-nous]

The result should be:

en/contact-us
de/kontakt
fr/contactez-nous

All of this should use a shared page so that the logic does not have to be implemented separately for each language.

Is this possible? Is there another approach without having to create three separate page.tsx files with lots of redundancy?

1 Answer 1

1

I figured it out by myself. I am using next-intl from now on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.