-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I18nManager.forceRTL doesn't apply changes on react-native components without reloading the app #16215
Comments
@hadar-ayoub there is a library to restart the app |
thanks @amorenew, i'm currently using react-native-restart library to apply RTL changes but i'm looking for an other way without restarting the app. |
@hadar-ayoub there is no other way and it's not a bug |
@hadar-ayoub I think we can make a class for handling it
|
hi @amorenew, sorry for my late reply. It's just not about alignText. I need to handle flexDirection ("row" & "row-reverse"), padding & margin (Left, Right), also change "flex-end" to "flex-start" and vice-versa, and changePosition of the drawer from left to right. I managed to overcome this issue by creating a class and a static method which take the state of isRTL dispatched with redux. Here is my code snippets :
I'll make soon a functional demo on my github repo . hope this solution works for you, until this issue is fixed on the upcoming releases. Cheers, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
Issue should be reopened and fixed. |
Same issue with |
yep. issue must be reopened |
same issue here. |
same issue |
is there is any news about rtl ltr switcher ? |
Verry good |
Ye, I would like to see any other solution. React-native-restart is not a good option in my opinion. |
ping.. same issue |
in iOS after made forceRTL it is not possible to change to LTR anymore even when I used react-native-restart and to also does not change nothing and keep the screens in RTL |
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
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.
Reproducible Demo
(https://github.com/hadar-ayoub/react-native-RTLdemo.git)
The text was updated successfully, but these errors were encountered: