first commit

This commit is contained in:
2026-06-14 16:10:40 +03:00
parent 8abc26cf2b
commit e2c51d3b9e
16 changed files with 2272 additions and 26 deletions
+15
View File
@@ -0,0 +1,15 @@
import {getRequestConfig} from 'next-intl/server';
import {routing} from './routing';
export default getRequestConfig(async ({requestLocale}) => {
let locale = await requestLocale;
if (!locale || !routing.locales.includes(locale as any)) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default
};
});
+10
View File
@@ -0,0 +1,10 @@
import {defineRouting} from 'next-intl/routing';
import {createNavigation} from 'next-intl/navigation';
export const routing = defineRouting({
locales: ['en', 'tr', 'de'],
defaultLocale: 'tr'
});
export const {Link, redirect, usePathname, useRouter, getPathname} =
createNavigation(routing);