Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix: matcher for translation middleware only supports en and de (#1528)

Meier Lukas38143b679e38
diff --git a/packages/translation/src/middleware.ts b/packages/translation/src/middleware.ts
index fd8948b10..4c41325ee 100644
--- a/packages/translation/src/middleware.ts
+++ b/packages/translation/src/middleware.ts
@@ -1,6 +1,7 @@
import createMiddleware from "next-intl/middleware";
import type { SupportedLanguage } from ".";
+import { supportedLanguages } from "./config";
import { createRouting } from "./routing";
export const createI18nMiddleware = (defaultLocale: SupportedLanguage) =>
@@ -8,5 +9,5 @@ export const createI18nMiddleware = (defaultLocale: SupportedLanguage) =>
export const config = {
// Match only internationalized pathnames
- matcher: ["/", "/(de|en)/:path*"],
+ matcher: ["/", `/(${supportedLanguages.join("|")})/:path*`],
};