diff --git a/src/app/i18n.ts b/src/app/i18n.ts new file mode 100644 index 0000000..692908f --- /dev/null +++ b/src/app/i18n.ts @@ -0,0 +1,12 @@ +import { getRequestConfig } from 'next-intl/server'; +import { notFound } from 'next/navigation'; + +const locales = ['en', 'nl', 'es']; + +export default getRequestConfig(async ({ locale }) => { + if (!locales.includes(locale as any)) notFound(); + + return { + messages: (await import(`./messages/${locale}.json`)).default + }; +});