diff --git a/src/components/downloadCard.tsx b/src/components/downloadCard.tsx index 3210acf..14c2e82 100644 --- a/src/components/downloadCard.tsx +++ b/src/components/downloadCard.tsx @@ -8,7 +8,8 @@ import { backendBaseUrl, fetchCountriesData } from "../backend"; const worldCountryCode = "WORLD"; export default function DownloadCard() { - const { t, i18n: { resolvedLanguage: language } } = useTranslation(); + const { t, i18n: { resolvedLanguage } } = useTranslation(); + const language = resolvedLanguage ?? "en"; function countryName(country: Country) { if (country.code === worldCountryCode) return t("sidebar.world"); const backendLanguageUppercase = language.toUpperCase(); diff --git a/src/components/languageSwitcher.tsx b/src/components/languageSwitcher.tsx index e60a3ae..a4091c3 100644 --- a/src/components/languageSwitcher.tsx +++ b/src/components/languageSwitcher.tsx @@ -9,7 +9,7 @@ export default function LanguageSwitcher() {