-
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
RTL bug with Text component #10812
Comments
+1 |
Okay obviously when you use |
@grmmph Not for iOS, it doesn't. Look at the RNPlay link. Android works fine, iOS doesn't. |
Works great on my ios emulator On Mon, Nov 21, 2016, 08:04 Ali Zahid [email protected] wrote:
|
@grmmph Did you look at the RN Play demo? What's your environment like? RN version? iOS version? |
@alizahid Did you add this line into you |
@alizahid did you managed to figure this out? |
@grmmph Yes. There's a
|
Cool. |
iOS uses available languages to set text direction, simply add Arabic language using xCode in project configuration, and text will be rendered in correct direction. |
This is indeed an important issue for all of us implementing RTL localizations. It shall includes @alizahid findings about writingDirection, it shall also clarify (at least for me) if we need to add the native code in AppDelegate.m and in MainActivity.java. Looking forward to a new piece of documentation regarding RTL, Thanks! |
This issue makes me glad we Jews an Arabs finally found a common enemy! |
I do not know how to write in arabic but I remember some good words from my grandma that was a arabic speaker (Jewish tunisian origin): Yatik sah'a @alizahid for the findings. I do believe that all RTL language speakers have true values in common. |
Yes. We all get our hands dirty from ink after writing. |
Is this still on? |
We use the workaround suggested by @alizahid that works great for us. I believe this is still on |
It's not working for some reason, maybe it will work fine in the production? |
@philjoseph @moerabaya Does this help? |
@alizahid nope, it only works when the device language is arabic and there's another issue in react that the app won't change back to english (LTR) when the device language is changed to arabic!! Thank you so much. |
@moerabaya Yeah, that's a good one. Only way you can fix that is by using the |
@bluetec Hello, How can i add the arabic lang to my xcode project? |
RN41.2: for me it only works when wrapping text with writing direction property.
|
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
Hello guys , I had "Use of undeclared identifier" once I added : [[RCTI18nUtil sharedInstance] allowRTL:YES]; into AppDelegate.m . Any useful suggestions? Thanks |
On Android, I kind of have the same issue but it's regarding the inconsistencies when Arabic script text is mixed with non-script characters & words. Here's some of my observations of how it works on Android:
Here's an example: I really just want to get the text content looking like the WebView example. Anyone have suggestions? |
Just for a quick fix: do not set |
@jamsch note that writingDirection is ignored in Android. i think that your rtl settings are simply being ignored. same for me. i have mixed bidi text, and i know that bidi algos require writing direction to handle conflicting cases. so i reckon as long as this is not supported for Android, there's a limitation there. |
Setting
|
Any updates on this one?
and than reload. any ideas? |
still facing the same issue I converted the text to HTML and used update!
|
Appending the unicode character code: LEFT-TO-RIGHT-OVERRIDE seems to work on Android. <Text>{`\u202D${text}`}</Text> |
@bluetec I've added Arabic to languages but it didn't change anything! |
Mine is probably a totally different problem but perhaps related. The app is in English but on a Hebrew Android (J7 or S7) it shows right to left instead of Left to Right regardless of the I18n RTL setting to true or false. Any pointers? |
Hello there 👋 this issue seems to have been inactive for the past few weeks. Because of this, it's likely that the issue is not a high priority anymore or it has been solved by OP; for these reasons, we'll close it. But please, if it's actually still an issue with 0.59 please comment below and we can reopen it or please send us a Pull Request with a fix 😊 |
I still have the prolbem in react If set align to right, the text goes to left! Also when I set align to left its work in some case But when I put a element before text ( for example a icon from fontawsome ) the icon go to left side of text. I try to put icon after text and get the same result I currenlty put align to left and find no way to put icon in right side of text here is my code
|
I have a weird problem with textAlign attribute
|
@AE0011 did you find a solution? |
@mg4u I downgraded react native to version 0.59.2 and problem solved. it seems that it is fixed in new release 0.59.8 but I didn't test it |
Seems to be fixed in react-native |
For me, I actually forgot to add the localization on iOS. Once I added it, it worked |
Setting textAligh: left works for me too!!. after forceRTL now left is the right and right is the left. very confused. "react": "16.8.3", |
I'm also having this icon problem. @AliAzizi were you able to find a solution? |
@ds8k I'm using flex, here is an example
and my style for that
|
|
Description
When
I18nManager.forceRTL(true)
to test my RTL app, I came across a bug with the<Text>
component.When the app is LTR, multiline text in Arabic renders from right to left, with the subsequent lines starting from right as well.
However, if the app is RTL, this happens.
I used
flexDirection: 'flex-start'
on the<Text>
to make it start from the correct side. I tried usingtextAlign: 'right'
, but had no luck.Reproduction
https://rnplay.org/apps/GfNikw
Additional Information
The text was updated successfully, but these errors were encountered: