import type { Locale } from './config'; import type { Dictionary } from './dictionaries/fa'; const loaders: Record Promise> = { 'fa-IR': () => import('./dictionaries/fa').then((m) => m.default), 'en-US': () => import('./dictionaries/en').then((m) => m.default), }; export const getDictionary = async (locale: Locale): Promise => loaders[locale](); export type { Dictionary };