import { Text } from "@/components/common/Text"; import { useSettings } from "@/utils/atoms/settings"; import { getLocales } from "expo-localization"; import { useTranslation } from "react-i18next"; import { TouchableOpacity, View, ViewProps } from "react-native"; interface Props extends ViewProps {} export const LanguageSwitcher: React.FC = ({ ...props }) => { const { i18n } = useTranslation(); const lngs = ["en", "fr", "sv"]; const [settings, updateSettings] = useSettings(); return ( {lngs.map((l) => ( { i18n.changeLanguage(l); updateSettings({ preferedLanguage: l }); }} > {l} ))} ); };