11 lines
332 B
TypeScript
11 lines
332 B
TypeScript
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 getDictionary = async (locale: Locale) => dictionaries[locale]()
|