Next.js internationalization - best practices alternates pages use different URLs and paths?

Hi everyone,

I'm working on a Next.js 15 App Router project using Prismic for content and Prisma with PostgreSQL for structured data. I'm currently integrating internationalization based on the Prismic i18n docs, and I’ve hit a bit of a challenge.

For one specific custom page type (e.g., pages about tools), the URLs and paths are not simple translations — they’re completely different:

  • English version: example.com/tools/xyz
  • French version: example.com/fr/outils/abc

So my questions are:

  1. What’s the best way to manage this kind of mapping in Prismic?
    Should I be using linked documents with alternate languages, or is there a better approach for pages that don't share slugs or follow a mirrored URL structure?

  2. How can I make my language switcher aware of the correct alternate URL?
    I’d like users to be able to switch languages and land on the equivalent localized page, even if the slugs and paths differ entirely.

Any advice or examples would be much appreciated!

Thanks in advance :folded_hands:

PS: I am using the libraries next-intl and use-intl.

Hi @Marving,

  1. What’s the best way to manage this kind of mapping in Prismic?

You can use linked documents and Prismic's built-in locale feature, even if the slugs differ. In each document, even if the uid (slug) is different between the languages, the pages will be linked together across languages and Prismic tracks that they're the same content entity in the API response.

You can then query the related alternate_languages in the API to get the uid in the target locale and use it for your slug.

  1. How can I make my language switcher aware of the correct alternate URL?

From the response above, you can then build a language switcher that:

  • Checks if there's an alternate language version in Prismic for the current page.
  • Gets the UID of the alternate version, and
  • Builds the correct path using your routing logic

Let me know if that helps or if you need more info :slight_smile: