diff --git a/src/config.ts b/src/config.ts index 613debd..1fe1c5e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,7 +1,16 @@ -import { createSharedPathnamesNavigation } from 'next-intl/navigation'; +import { Pathnames } from 'next-intl/navigation'; -export const locales = ['en', 'de'] as const; -export const localePrefix = 'always'; // Default +export const locales = ['en', 'ar'] as const; +export const defaultLocale = 'ar'; // Set default to Arabic as current content is Arabic -export const { Link, redirect, usePathname, useRouter } = - createSharedPathnamesNavigation({ locales, localePrefix }); \ No newline at end of file +// Use 'always' to ensure the locale is always in the URL (e.g., /en, /ar) +export const localePrefix = 'always'; + +// Define pathnames for internationalized routes if applicable +// For a single-page app with sections, pathnames might not be strictly necessary for section IDs, +// 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;