Import source: src/i18n/routing

Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
arsam
2026-09-18 23:05:57 +03:30
parent d2ed1b8868
commit ad3f4a8a3b
+19
View File
@@ -0,0 +1,19 @@
import {defineRouting} from 'next-intl/routing';
import {createNavigation} from 'next-intl/navigation';
export const routing = defineRouting({
// A list of all locales that are supported
locales: ['en', 'fa'],
// Used when no locale matches
defaultLocale: 'en',
// Custom prefix mode so that default locale doesn't get prefix
localePrefix: 'as-needed'
});
// Lightweight wrappers around Next.js' navigation APIs
// that will automatically consider the routing configuration
export const {Link, redirect, usePathname, useRouter, getPathname} =
createNavigation(routing);