From 981f758dc547191df351290603f54699a7ddfc5e Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 3 Jun 2026 21:38:49 +0000 Subject: [PATCH 1/2] Update src/config.ts --- src/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 5f14037..0a65fa2 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -import { Pathnames } from 'next-intl'; + export const locales = ['en', 'ar'] as const; export const defaultLocale = 'ar'; // Set default to Arabic as current content is Arabic @@ -11,6 +11,6 @@ export const localePrefix = 'always'; // but useful if you plan to have separate pages later (e.g., /en/about vs /ar/about) export const pathnames = { '/': '/', -} satisfies Pathnames; +}; export type AppPathnames = keyof typeof pathnames; From 91073bfd6ac659db815b59d87c9d10b0ce7cb174 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 3 Jun 2026 21:38:49 +0000 Subject: [PATCH 2/2] Update src/i18n.ts --- src/i18n.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/i18n.ts b/src/i18n.ts index 26cbd38..ba1b892 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -1,11 +1,5 @@ -import { getRequestConfig } from 'next-intl'; -import { notFound } from 'next/navigation'; + + import { locales } from './config'; -export default getRequestConfig(async ({ locale }) => { - if (!locales.includes(locale as any)) notFound(); - return { - messages: (await import(`../messages/${locale}.json`)).default, - }; -});