Files
cpost-front/i18n.ts
azizziy c01e852a59 init
2025-05-20 17:02:10 +05:00

12 lines
351 B
TypeScript

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