From 34f629b77a7e51c07c9413a4bf4caeaa8737ea58 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Sun, 18 Jan 2026 17:26:22 +0100 Subject: [PATCH] Reverted all changes back to version 680c72027448c2f08987aa9a1f21f75573b8dc8f --- i18n.ts | 5 ----- next-intl.config.ts | 1 + src/i18n.ts | 12 ++++++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 i18n.ts create mode 100644 next-intl.config.ts create mode 100644 src/i18n.ts diff --git a/i18n.ts b/i18n.ts deleted file mode 100644 index 0d4c315..0000000 --- a/i18n.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { getRequestConfig } from 'next-intl/server'; - -export default getRequestConfig(async ({ locale }) => ({ - messages: (await import(`./messages/${locale}.json`)).default -})); \ No newline at end of file diff --git a/next-intl.config.ts b/next-intl.config.ts new file mode 100644 index 0000000..25996a4 --- /dev/null +++ b/next-intl.config.ts @@ -0,0 +1 @@ +export { default } from './src/i18n'; \ No newline at end of file diff --git a/src/i18n.ts b/src/i18n.ts new file mode 100644 index 0000000..10fd8f4 --- /dev/null +++ b/src/i18n.ts @@ -0,0 +1,12 @@ +import {notFound} from 'next/navigation'; +import {getRequestConfig} from 'next-intl/server'; + +const locales = ['en']; + +export default getRequestConfig(async ({locale}) => { + if (!locales.includes(locale as any)) notFound(); + + return { + messages: (await import(`../messages/${locale}.json`)).default + }; +}); \ No newline at end of file