mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 22:16:58 +00:00
17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
import createMiddleware from 'next-intl/middleware';
|
|
|
|
export default createMiddleware({
|
|
// A list of all locales that are supported
|
|
locales: ['sv', 'en', 'nn'],
|
|
|
|
// If this locale is matched, pathnames work without a prefix (e.g. `/about`)
|
|
defaultLocale: 'sv',
|
|
|
|
// Don't automatically detect locale, sv is default.
|
|
localeDetection: false
|
|
});
|
|
|
|
export const config = {
|
|
// Skip all paths that should not be internationalized
|
|
matcher: ['/((?!api|_next|.*\\..*).*)']
|
|
}; |