first commit
This commit is contained in:
11
src/app/[lang]/dictionaries.ts
Normal file
11
src/app/[lang]/dictionaries.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { languages_types } from "@/types";
|
||||
import "server-only";
|
||||
|
||||
const dictionaries = {
|
||||
en: () => import("./dictionaries/en.json").then((module) => module.default),
|
||||
fa: () => import("./dictionaries/fa.json").then((module) => module.default),
|
||||
ar: () => import("./dictionaries/ar.json").then((module) => module.default),
|
||||
};
|
||||
|
||||
export const getDictionary = async (locale: languages_types) =>
|
||||
dictionaries[locale]();
|
||||
Reference in New Issue
Block a user