diff --git a/client/src/Components/inputs/LanguageSelector.tsx b/client/src/Components/inputs/LanguageSelector.tsx index 5cd96f857..430cd28b5 100644 --- a/client/src/Components/inputs/LanguageSelector.tsx +++ b/client/src/Components/inputs/LanguageSelector.tsx @@ -7,7 +7,7 @@ import { useDispatch } from "react-redux"; import { setLanguage } from "@/Features/UI/uiSlice"; import type { RootState } from "@/Types/state"; -const languageNames: Record = { +export const languageNames: Record = { en: "English", de: "Deutsch", es: "EspaƱol", diff --git a/client/src/Pages/Settings/index.tsx b/client/src/Pages/Settings/index.tsx index ac7237c91..d1040b913 100644 --- a/client/src/Pages/Settings/index.tsx +++ b/client/src/Pages/Settings/index.tsx @@ -24,6 +24,7 @@ import type { SettingsFormData, SettingsFormInput } from "@/Validation/settings" import { useState } from "react"; import { Controller } from "react-hook-form"; import { TextField, Button, FieldLabel, SliderWithLabel } from "@/Components/inputs"; +import { languageNames } from "@/Components/inputs/LanguageSelector"; import { Box, Typography } from "@mui/material"; import { useDelete } from "@/Hooks/UseApi"; @@ -327,7 +328,7 @@ export const SettingsPage = () => { key={lang} value={lang} > - {lang.toUpperCase()} + {languageNames[lang] ?? lang} ))}