Mats Fangohr
2024-02-05 b061b1b6a229e042a2a0c08e5a4d8ed016f46a1e
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Translation } from "./locales/definition"
import en from "./locales/en-US"
import fr from "./locales/fr-FR"
import de from "./locales/de-DE"
 
export const TRANSLATIONS = {
  "en-US": en,
  "fr-FR": fr,
  "de-DE": de,
} as const
 
export const i18n = (locale: ValidLocale): Translation => TRANSLATIONS[locale]
export type ValidLocale = keyof typeof TRANSLATIONS