Update src/i18n.ts

This commit is contained in:
2026-06-03 21:35:52 +00:00
parent 57baf85e34
commit a18357792f

View File

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