Nextjs, React, Localization, Routing, Web Development.
start by creating a middleware.ts file in the root directory, at the same level as the app folder. // middleware.ts let locales = ["en", "nl"]; export function middleware(request) { // Check if there is any supported locale in the pathname const { pathname } = request.nextUrl; const