ReactNativeLocalization
ReactNativeLocalization copied to clipboard
setLanguage
import strings from '../../localization';
const setLanguage = (lang) => { strings.setLanguage(lang); }
string of setLanguage not working other pages Why?
Not working for me as well.
Not working at all on other pages
@minhtet7674 @funnyjerry : Need to set blank state to reflect changes on the current screen. And after that, it will automatically change the language on all the future loading components
_onSetLanguageToItalian() {
strings.setLanguage('it');
this.setState({});
}
It is working for me this way.
Resolved! You need to trigger on router component with props.
@jariwalabhavesh It's would be nice if other components change language immediately, not future loading.