language i18n added and tested for server and client side

This commit is contained in:
2025-07-28 18:45:23 +03:00
parent e9cb161f90
commit cbe62d8734
43 changed files with 2778 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import createMiddleware from "next-intl/middleware";
import { routing } from "@/i18n/routing";
export default createMiddleware({
// A list of all locales that are supported
locales: routing.locales,
// Used when no locale matches
defaultLocale: routing.defaultLocale,
// Locale detection strategies
localeDetection: true,
// Uncomment to use domains for language-specific subdomains
// domains: [
// {
// domain: 'example.com',
// defaultLocale: 'en'
// },
// {
// domain: 'example.fr',
// defaultLocale: 'fr'
// }
// ]
});
export const config = {
// Match all pathnames except for
// - API routes
// - Static files
// - _next internal paths
matcher: ["/((?!api|_next|.*\\..*).*)"],
};