Merge version_2 into main
Merge version_2 into main
This commit was merged in pull request #4.
This commit is contained in:
12
src/app/i18n.ts
Normal file
12
src/app/i18n.ts
Normal file
@@ -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
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user