Add src/middleware.ts

This commit is contained in:
2026-06-09 18:14:06 +00:00
parent 1e2b792f1b
commit f6f4a060cc

17
src/middleware.ts Normal file
View File

@@ -0,0 +1,17 @@
import createMiddleware from 'next-intl/middleware';
import { locales } from './i18n';
export default createMiddleware({
locales,
defaultLocale: 'en',
localePrefix: 'as-needed',
});
export const config = {
matcher: [
'/',
'/(es|en)/:path*',
// Enable a redirect to a matching locale at the root
// '/((?!_next|_vercel|.*\..*).*)',
],
};