We used local localization for our project, and it is very useful, this is our use:
... / ApplicationRoot / Utils / strings.js
import LocalizedStrings from 'react-native-localization';
let Strings = new LocalizedStrings({
ar:{
hello:'أهلاً',
howareyou:'كيف حالك؟'
},
en:{
hello:'Hello!',
howareyou:'How Are You?'
}
});
module.exports = Strings;
after that we import it into any component that we want to use in it:
TestComponent.js:
import Strings from './utils/strings.js'
...
<Text>Strings.hello</Text>
source
share