react-native多语言解决方案。
npm i react-native-i18n-guosheng --save-dev
import i18n from 'react-native-i18n-guosheng'
let langJson = {
en_US: {
name: {
first: 'kyo',
last: 'guo'
}
},
fr_FR: {
name: {
first: 'kyo_fr',
last: 'guo_fr'
}
}
}
let $t = i18n.create(langJson);
let firstName = $t('name.first');
console.log(firstName);