Description
Is this a bug report?
(yes)
I was working lately on a mobile app using react-native, i was led to implement i18n for both languages (arabic and english). to switch between these two languages, i force RTL using I18nManager but the app needs to be reloaded to apply the changes, i use react-native-restart to reload app automatically after persisting the chosen language. is there any convenient way to force RTL without restating the app. Here is my code snippets :
Have you read the Contributing Guidelines?
(yes)
Environment
Environment:
OS: macOS Sierra 10.12.4
Node: 7.10.0
Yarn: 0.23.4
npm: 4.2.0
Watchman: 4.7.0
Xcode: Version 8.3.2 Build version 8E2002
Android Studio: 2.2.3 AI.145.3537739
Packages: (wanted => installed)
react-native: 0.47.2 => 0.47.2
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native-localization: 0.1.32 => 0.1.32
Steps to Reproduce
- create a screen with a Switch component to change displaying react-native components from LTR to RTL
- call I18nManager.forceRTL method on the onValueChange param of the Switch component
- call setLanguage method to set RTL language (arabic, hebrew …)
Expected Behavior
Render the screen with the chosen RTL language and alignement
Actual Behavior
Render the screen with chosen language but screen components doesn’t change alignement from right to left.
Activity