Switch to version 6: remove src/i18n.ts
This commit is contained in:
13
src/i18n.ts
13
src/i18n.ts
@@ -1,13 +0,0 @@
|
||||
// @ts-expect-error next-intl server config type mismatch
|
||||
import { getRequestConfig } from 'next-intl/server';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
export const locales = ['en', '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