Created
November 25, 2023 23:24
-
-
Save FrancisGregori/3075b75c21984e4ae4bac3a4be201323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createMiddleware from 'next-intl/middleware'; | |
import { locales } from './navigation'; | |
export default createMiddleware({ | |
locales, | |
defaultLocale: 'en', | |
localePrefix: 'never', | |
localeDetection: false, | |
domains: [ | |
{ | |
domain: process.env.PT_DOMAIN!, | |
defaultLocale: 'pt', | |
locales: ['pt'], | |
}, | |
{ | |
domain: process.env.ES_DOMAIN!, | |
defaultLocale: 'es', | |
locales: ['es'], | |
}, | |
], | |
}); | |
export const config = { | |
// Skip all paths that should not be internationalized | |
matcher: ['/((?!_next|_vercel|.*\\..*).*)'], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment