From 46b2da142fc43802a71596292ba397169fe3c1a4 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 3 Jun 2026 21:33:52 +0000 Subject: [PATCH] Add src/i18n.ts --- src/i18n.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/i18n.ts diff --git a/src/i18n.ts b/src/i18n.ts new file mode 100644 index 0000000..1974542 --- /dev/null +++ b/src/i18n.ts @@ -0,0 +1,11 @@ +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, + }; +});