nextjs-multi-domain-locale icon indicating copy to clipboard operation
nextjs-multi-domain-locale copied to clipboard

Handling different slugs for same endpoint depending on lang

Open hising opened this issue 4 years ago • 1 comments
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 avatar Apr 10 '21 19:04 hising

@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

tomsoderlund avatar Apr 10 '21 21:04 tomsoderlund