22 lines
552 B
TypeScript
22 lines
552 B
TypeScript
import createMiddleware from 'next-intl/middleware';
|
|
|
|
export default createMiddleware({
|
|
// A list of all locales that are supported
|
|
locales: ['en', 'ka'],
|
|
|
|
// Used when no locale matches
|
|
defaultLocale: 'en',
|
|
|
|
// Always redirect to locale-prefixed paths
|
|
localePrefix: 'always'
|
|
});
|
|
|
|
export const config = {
|
|
// Match all pathnames except for
|
|
// - api routes
|
|
// - _next (Next.js internal)
|
|
// - _vercel (Vercel internal)
|
|
// - all files with extensions
|
|
matcher: ['/((?!api|_next|_vercel|.*\\..*).*)', '/'],
|
|
runtime: 'nodejs'
|
|
}; |