nextjs-multi-domain-locale
nextjs-multi-domain-locale copied to clipboard
Handling different slugs for same endpoint depending on lang
trafficstars
One reason to include Express (or similar) for handling multitenancy with Next.JS is to be able to handle different slugs/urls for the same endpoints:
- English: About
- Swedish: Om
But they should end up at the same endpoint. It would be awesome to find a pattern that solves this within the Next-framework without adding more moving parts to your stack. Not a bug with current setup, just and idea/finding when working with NextJS and multitenancy
@hising If you have the language (from the domain) AND the slug, doing that lookup should be fairly easy. I’m thinking e.g.
article → (one to many) → article_language