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