14 lines
329 B
TypeScript
14 lines
329 B
TypeScript
import createMiddleware from 'next-intl/middleware';
|
|
|
|
export default createMiddleware({
|
|
// A list of all locales that are supported
|
|
locales: ['en', 'it'],
|
|
|
|
// Used when no locale matches
|
|
defaultLocale: 'en'
|
|
});
|
|
|
|
export const config = {
|
|
// Match only internationalized pathnames
|
|
matcher: ['/', '/(en|it)/:path*']
|
|
}; |