¿Как быстро осуществляется реализация (i18n) персонализированных (нестандартных шрифтов) usando expo-cli? - PullRequest
0 голосов
/ 07 октября 2019

сою nuevo en React Native, Estoy реализует и применяет сэнсил, per quedé estancado en el inicio, no puedo usar i18n y fuentes personalizadas al mismo tiempo,

Он пробуждается от разных сторон,нет, нет, я не знаю, что ты делаешь, есть проблемы, есть проблемы, которые ты разделяешь, pero no sé como solucionarlo

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import * as Font from 'expo-font';
import Logo from './components/pages/initialPage/Logo'
import I18N from './components/translation/I18n'

export default class App extends React.Component {
  constructor(props) {
        super(props);
        this.state = {
            fontLoaded: false
        };
    }

    async componentDidMount() {
        Font.loadAsync({
AristotelicaSmallCaps:require('./components/fonts/AristotelicaSmallCaps-Regular.ttf'),
BebasNeue: require('./components/fonts/BebasNeue-Regular.ttf')
        })
            .then(() => {
                this.setState({ fontLoaded: true });
                console.log('fuente cargada: ');
            })
            .catch(e => {
                console.log('error: ', e);
            });
    }
  render() {
    return  this.state.fontLoaded == true ? (


<View style={styles.container}>


<Text style={styles.textName}>{I18n.t('Hola mundo')}</Text>

            </View>
    ) : (
            <View style={styles.container}></View>
        );
  }
}

const styles = StyleSheet.create({
  container: {
        flex: 1,
        flexDirection: 'column',
        backgroundColor: '#152850',
        alignItems: 'center',
        justifyContent: 'center',
        alignContent: 'space-between'
  },
  textName: {
        margin: 5,
        marginBottom: 30,
        fontSize: 80,
        textAlign: 'center',
        color: 'white',
        fontFamily: 'AristotelicaSmallCaps'
    }
});

en este codigo, нет никаких функций, такие как perco esque llamando laфункции, связанные с модификацией {I18n.t ('Hola mundo')}, в том числе и архивные, и открытые, как, например, Hola Mundo Dr entonces funcionará

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...