12 lines
318 B
TypeScript
12 lines
318 B
TypeScript
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";
|