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