Update src/i18n.ts
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { getRequestConfig } from 'next-intl/server';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { locales } from './config';
|
||||
|
||||
// Can be imported from a shared config
|
||||
const locales = ['en', 'de'];
|
||||
|
||||
export default getRequestConfig(async ({ locale }) => {
|
||||
if (!locales.includes(locale as any)) notFound();
|
||||
@@ -8,4 +9,4 @@ export default getRequestConfig(async ({ locale }) => {
|
||||
return {
|
||||
messages: (await import(`../messages/${locale}.json`)).default,
|
||||
};
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user