Update src/i18n.ts

This commit is contained in:
2026-06-03 21:39:25 +00:00
parent c97a4dc22f
commit ef41176ac8

View File

@@ -1,5 +1,13 @@
import { notFound } from 'next/navigation';
// import { getRequestConfig } from 'next-intl';
// Can be imported from a shared config
const locales = ['en', 'de'];
import { locales } from './config';
export default getRequestConfig(async ({ locale }) => {
if (!locales.includes(locale as any)) notFound();
return {
messages: (await import(`../messages/${locale}.json`)).default,
};
});