chore(i18n): refactor and cleanup (#805)

* checkpoint

* finish

* docs
This commit is contained in:
Jacky Zhao authored and GitHub committed 2024-02-04 20:57:10 -08:00
1 parent dff4b06313
commit 36e4cc41a9
37 files changed
+326 -211

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { Translation } from "./locales/definition"
import en from "./locales/en-US"
import fr from "./locales/fr-FR"
export const TRANSLATIONS = {
"en-US": en,
"fr-FR": fr,
} as const
export const i18n = (locale: ValidLocale): Translation => TRANSLATIONS[locale]
export type ValidLocale = keyof typeof TRANSLATIONS