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

12 lines
331 B
TypeScript

import { getRequestConfig } from 'next-intl/server';
import { notFound } from 'next/navigation';
import { locales } from './config';
export default getRequestConfig(async ({ locale }) => {
if (!locales.includes(locale as any)) notFound();
return {
messages: (await import(`../messages/${locale}.json`)).default,
};
});