fb
This commit is contained in:
9
dictionaries/get-dictionary.ts
Normal file
9
dictionaries/get-dictionary.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import 'server-only'
|
||||
|
||||
const dictionaries = {
|
||||
en: () => import('./en.json').then((module) => module.default),
|
||||
tr: () => import('./tr.json').then((module) => module.default),
|
||||
}
|
||||
|
||||
export const getDictionary = async (locale: 'en' | 'tr') =>
|
||||
dictionaries[locale]?.() ?? dictionaries.en()
|
||||
Reference in New Issue
Block a user