Files
d1454cfb-0c75-48e8-a67c-20e…/src/i18n.ts
2026-06-03 21:42:39 +00:00

14 lines
372 B
TypeScript

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