mirror of
https://github.com/HugeFrog24/shakethefrog.git
synced 2026-03-02 00:14:33 +00:00
23 lines
794 B
TypeScript
23 lines
794 B
TypeScript
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', 'de', 'ru', 'ka', 'ar'],
|
|
|
|
// Used when no locale matches
|
|
defaultLocale: 'en',
|
|
|
|
// The `pathnames` object holds pairs of internal and
|
|
// external paths. Based on the locale, the external
|
|
// paths are rewritten to the shared, internal ones.
|
|
pathnames: {
|
|
// If all locales use the same pathname, a single
|
|
// external path can be provided for all locales
|
|
'/': '/',
|
|
}
|
|
});
|
|
|
|
// Lightweight wrappers around Next.js' navigation APIs
|
|
// that will consider the routing configuration
|
|
export const { Link, redirect, usePathname, useRouter } = createNavigation(routing); |