-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdictionaries.ts
More file actions
15 lines (12 loc) · 650 Bytes
/
dictionaries.ts
File metadata and controls
15 lines (12 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import 'server-only';
const dictionaries = {
en: () => import('./locales/en.json').then((module) => module.default),
cz: () => import('./locales/cz.json').then((module) => module.default),
de: () => import('./locales/de.json').then((module) => module.default),
uk: () => import('./locales/uk.json').then((module) => module.default),
ko: () => import('./locales/ko.json').then((module) => module.default),
tr: () => import('./locales/tr.json').then((module) => module.default),
};
export type SupportLanguageDict = keyof typeof dictionaries;
export const getDictionary = async (locale: SupportLanguageDict) =>
dictionaries[locale]();