Restore multilingual support: / for sr, /en for en with browser detection
This commit is contained in:
@@ -2,12 +2,13 @@ import createMiddleware from "next-intl/middleware";
|
||||
import { defineRouting } from 'next-intl/routing';
|
||||
|
||||
const routing = defineRouting({
|
||||
locales: ['sr'],
|
||||
defaultLocale: 'sr'
|
||||
locales: ['sr', 'en'],
|
||||
defaultLocale: 'sr',
|
||||
localePrefix: 'as-needed'
|
||||
});
|
||||
|
||||
export default createMiddleware(routing);
|
||||
|
||||
export const config = {
|
||||
matcher: ['/((?!api|_next|_vercel|).*)']
|
||||
matcher: ['/((?!api|_next|_vercel|.*\\..*).*)']
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user