Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1ea2c6d77 | |||
| d5e5e3af0a | |||
| 89bb46fdf2 | |||
| 19b50534f5 | |||
| 273710883e | |||
| f506dcd938 | |||
| 37e8e4a76b | |||
| f98887238d |
13
src/app/i18n.ts
Normal file
13
src/app/i18n.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// @ts-expect-error next-intl type issue
|
||||||
|
import { getRequestConfig } from 'next-intl';
|
||||||
|
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