mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 05:37:51 +00:00
16 lines
496 B
TypeScript
16 lines
496 B
TypeScript
import createMiddleware from 'next-intl/middleware';
|
|
|
|
export default createMiddleware({
|
|
// A list of all locales that are supported
|
|
locales: ['en', 'ja'],
|
|
|
|
// If this locale is matched, pathnames work without a prefix (e.g. `/about`)
|
|
defaultLocale: 'en'
|
|
});
|
|
|
|
export const config = {
|
|
// Skip all paths that should not be internationalized. This example skips the
|
|
// folders "api", "_next" and all files with an extension (e.g. favicon.ico)
|
|
matcher: ['/((?!api|_next|.*\\..*).*)']
|
|
};
|