import {View, Text, Button, I18nManager} from 'react-native';
import React from 'react';
import SplashScreen from 'react-native-splash-screen';
import {useEffect} from 'react';
import {useTranslation} from 'react-i18next';

const SplashScreenComp = () => {
  const {t, i18n} = useTranslation();
  useEffect(()=>{
    i18n.changeLanguage("ur")
    I18nManager.forceRTL(false)
  }, [])
  return (
    <View>
      <Button
        onPress={() => {i18n.changeLanguage("en"); I18nManager.forceRTL(false)}}
        title="English"
        color="#841584"
      />
      <Button
        style={{marginTop: 210}}
        onPress={() => {i18n.changeLanguage("ur"); I18nManager.forceRTL(true)}}
        title="URDU"
        color="#000"
      />
      <Text>{t('welcometext')}</Text>
    </View>
  );
};

export default SplashScreenComp;
