Refactor for i18n, CMS integration, and project slugs; enhance admin & analytics

Co-authored-by: dennis <dennis@konkol.net>
This commit is contained in:
Cursor Agent
2026-01-12 14:36:10 +00:00
parent 0349c686fa
commit 12245eec8e
55 changed files with 4573 additions and 753 deletions

16
i18n/request.ts Normal file
View File

@@ -0,0 +1,16 @@
import { getRequestConfig } from 'next-intl/server';
export const locales = ['en', 'de'] as const;
export type AppLocale = (typeof locales)[number];
export default getRequestConfig(async ({ locale }) => {
// next-intl can call us with unknown/undefined locales; fall back safely
const requested = typeof locale === "string" ? locale : "en";
const safeLocale = (locales as readonly string[]).includes(requested) ? requested : "en";
return {
locale: safeLocale,
messages: (await import(`../messages/${safeLocale}.json`)).default,
};
});