first commit

This commit is contained in:
mstfyldz
2026-06-03 16:13:15 +03:00
parent a3b76fa65d
commit 716bad9d7c
40 changed files with 2698 additions and 135 deletions
+16
View File
@@ -0,0 +1,16 @@
import 'server-only';
const dictionaries = {
en: () => import('../dictionaries/en.json').then((module) => module.default),
tr: () => import('../dictionaries/tr.json').then((module) => module.default),
};
export type Locale = keyof typeof dictionaries;
export const i18n = {
defaultLocale: 'tr',
locales: ['tr', 'en'],
} as const;
export const getDictionary = async (locale: Locale) => {
return dictionaries[locale]?.() ?? dictionaries.tr();
};