Download src/components/features/settings/app-settings/language-input.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/settings/app-settings/language-input.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/settings/app-settings/language-input.tsx
-
curl -L -o language-input.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/settings/app-settings/language-input.tsx
825 Bytes
| import { useTranslation } from "react-i18next"; | |
| import { AvailableLanguages } from "#/i18n"; | |
| import { I18nKey } from "#/i18n/declaration"; | |
| import { SettingsDropdownInput } from "../settings-dropdown-input"; | |
| interface LanguageInputProps { | |
| name: string; | |
| onChange: (value: string) => void; | |
| defaultKey: string; | |
| } | |
| export function LanguageInput({ | |
| defaultKey, | |
| onChange, | |
| name, | |
| }: LanguageInputProps) { | |
| const { t } = useTranslation("openhands"); | |
| return ( | |
| <SettingsDropdownInput | |
| testId={name} | |
| name={name} | |
| onInputChange={onChange} | |
| label={t(I18nKey.SETTINGS$LANGUAGE)} | |
| items={AvailableLanguages.map((l) => ({ | |
| key: l.value, | |
| label: l.label, | |
| }))} | |
| defaultSelectedKey={defaultKey} | |
| isClearable={false} | |
| wrapperClassName="w-full min-w-0" | |
| /> | |
| ); | |
| } | |