Commit 70440bbc authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se actualizó la implemnetación del icono de cambiar lenguaje

parent 4dead0eb
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
import { Entypo } from '@expo/vector-icons';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { LANG } from '../translations';
import { useTranslation } from 'react-i18next';

export const LanguageIcon = () => {
    const { i18n } = useTranslation();
    const changeLanguage = () => {
        if (LANG.locale === 'es') {
            // Change to english RTL
            LANG.locale = 'en';
            

        }
        else {
            LANG.locale = 'es';
        }
        i18n.changeLanguage(i18n.language === 'en' ? 'es' : 'en');
    }

    return (