maui
maui copied to clipboard
Flow direction is LeftToRight on iOS rtl language
Description
On android, when the language is set to an RTL language, the flow direction of all the controls is also set to RightToLeft. Still, on iOS, even when the device language is an RTL language, the Device.FlowDirection is still set to LeftToRight.RTL
Steps to Reproduce
- Create a File > New .NET MAUI app.
- Run on an iOS device whose language is set to an RTL language.
Device.FlowDirectionis still set toLeftToRight
Version with bug
6.0.400 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS
Did you find any workaround?
No response
Relevant log output
No response
Are you setting RightToLeft FlowDirection and the value in Device.FlowDirection is incorrect or also the UI is not updated correctly?
Hi @yairp03. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
On Android, I do not set anything. If my phone is in Hebrew then the default flow direction for the entire app is RightToLeft without needing to set anything. If I change the phone language to English and restart the app, the flow direction will automatically be LeftToRight.
On iOS, it doesn't happen, and I found out that the property that is responsible for that is probably Device.FlowDirection cause it changes on android. Still, on iOS, its value remains LeftToRight even if I change the iPhone language to Hebrew, and the app is LeftToRight.
Is there any workaround for this? A way to get the supposed flow direction and set it manually on startup?
I have the same issue in android (don't have mac to test) with Arabic language is still Right-to-left when change language to English it changed to Left-to-right so, the issue is Flow Direction forced to device language not to Flow Direction Property
I am also facing this issue exactly as described by @yairp03 but with Arabic. RTL does not work correctly in iOS where as it works perfectly in Android. Unfortunately it is stopping me from going to production for a customer. This issue requires a faster fix if you plan to have maui competitive to platforms like Flutter.
I Have a similar Issue, and this one more a bigger issue. When i change the language to Arabic(RTL), It doesn't show anything on the screen for child contentView. looks like RTL is completely broken in MAUI. This is the worst. I have a Xamarin form app which I am migrating to MAUI but completely block on the RTL language
.Net version : 7.0.86 (latest)
Screenshot of sample Apps:
English(works fine ) :
Arabic( nothing shows):
Any updates 🤔
I also faced this problem, unfortunately there is no solution
try adding this workaround NuGet PureWeen.Maui.FixesAndWorkarounds,
https://github.com/PureWeen/ShanedlerSamples/tree/main
Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0. Can repro on iOS platform.
Hi @yairp03. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.