Skip to content
Discussion options

You must be logged in to vote

You can either opt-ouf for specific cases, or you can disable type safety altogether with something like:

import {defineRouting} from 'next-intl/routing';

export const routing = defineRouting({
  locales: ['en', 'de'],
  defaultLocale: 'en',
  pathnames: {
    '/pathnames': {
      de: '/pfadnamen'
    }
  } as any // This disables validation of pathnames
});

If there's no matching entry in your config, next-intl will fall back to assuming no translated variants are available.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexclinky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants