Next.js Discord

Discord Forum

Handling localization of content type slug

Unanswered
Alaskan Klee Kai posted this in #help-forum
Open in Discord
Alaskan Klee KaiOP
I'm building an app with two languages, the app will have a content type programme that has a slug (/programme/im-some-content/) this content can be translated to swedish and should then be accessible at /program/jag-ar-lite-content/. I'm translating the slugs in the CMS. But I'm not quite sure how to handle the "content type slug" (program/programme). As it is now I've setup my router like this: app/programme/[slug]/page.tsx but then programme obviously is static.

Would it make sense to create app/program/[slug]/page.tsx to handle the swedish translation or is there some smarter way to go about it?

0 Replies