From 99a99fe4b29a889241f3f6ebc486abe9eb7d7910 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Sun, 18 Jan 2026 17:05:46 +0100 Subject: [PATCH] [dyad] Simplifying next-intl configuration - wrote 1 file(s), deleted 2 file(s) --- i18n.ts | 5 +++++ next-intl.config.ts | 1 - src/i18n.ts | 12 ------------ 3 files changed, 5 insertions(+), 13 deletions(-) create mode 100644 i18n.ts delete mode 100644 next-intl.config.ts delete mode 100644 src/i18n.ts diff --git a/i18n.ts b/i18n.ts new file mode 100644 index 0000000..0d4c315 --- /dev/null +++ b/i18n.ts @@ -0,0 +1,5 @@ +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 deleted file mode 100644 index 25996a4..0000000 --- a/next-intl.config.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './src/i18n'; \ No newline at end of file diff --git a/src/i18n.ts b/src/i18n.ts deleted file mode 100644 index 10fd8f4..0000000 --- a/src/i18n.ts +++ /dev/null @@ -1,12 +0,0 @@ -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