fix(i18n): add default locale

This commit is contained in:
Jacky Zhao 2024-02-05 14:19:21 -08:00
parent 19fc53854f
commit 2b9659a1c2

View file

@ -13,5 +13,5 @@ export const TRANSLATIONS = {
"nl-NL": nl, "nl-NL": nl,
} as const } as const
export const i18n = (locale: ValidLocale): Translation => TRANSLATIONS[locale] export const i18n = (locale: ValidLocale): Translation => TRANSLATIONS[locale ?? "en-US"]
export type ValidLocale = keyof typeof TRANSLATIONS export type ValidLocale = keyof typeof TRANSLATIONS