fix: set default locale for lang attribute

This commit is contained in:
Jacky Zhao committed 2024-02-08 09:31:36 -08:00
1 parent fd785ada56
commit a87704cd05
2 files changed
+3 -3

No files matched your search

+2 -1
View File
@@ -20,5 +20,6 @@ export const TRANSLATIONS = {
"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