Jacky Zhao
2024-02-08 a87704cd05e379c670abce823385fb937a65920d
quartz/i18n/index.ts
@@ -6,6 +6,7 @@
import nl from "./locales/nl-NL"
import ro from "./locales/ro-RO"
import es from "./locales/es-ES"
import uk from "./locales/uk-UA"
export const TRANSLATIONS = {
  "en-US": en,
@@ -14,8 +15,11 @@
  "de-DE": de,
  "nl-NL": nl,
  "ro-RO": ro,
  "ro-MD": ro,
  "es-ES": es,
  "uk-UA": uk,
} as const
export const i18n = (locale: ValidLocale): Translation => TRANSLATIONS[locale ?? "en-US"]
export const defaultTranslation = "en-US"
export const i18n = (locale: ValidLocale): Translation => TRANSLATIONS[locale ?? defaultTranslation]
export type ValidLocale = keyof typeof TRANSLATIONS