Merge version_3 into main

Merge version_3 into main
This commit was merged in pull request #8.
This commit is contained in:
2026-06-03 21:38:53 +00:00
2 changed files with 4 additions and 10 deletions

View File

@@ -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<typeof locales>;
};
export type AppPathnames = keyof typeof pathnames;

View File

@@ -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,
};
});