init localize
This commit is contained in:
11
lib/i18n/index.ts
Normal file
11
lib/i18n/index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Locale, Dictionary } from "./types";
|
||||
import de from "./de";
|
||||
import en from "./en";
|
||||
|
||||
export const dictionaries: Record<Locale, Dictionary> = { de, en };
|
||||
|
||||
export function getDictionary(locale: Locale): Dictionary {
|
||||
return dictionaries[locale] ?? en;
|
||||
}
|
||||
|
||||
export { type Locale, type Dictionary } from "./types";
|
||||
Reference in New Issue
Block a user