maui icon indicating copy to clipboard operation
maui copied to clipboard

Flow direction is LeftToRight on iOS rtl language

Open yairp03 opened this issue 3 years ago • 5 comments

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

  1. Create a File > New .NET MAUI app.
  2. Run on an iOS device whose language is set to an RTL language.
  3. Device.FlowDirection is still set to LeftToRight

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

yairp03 avatar Jul 06 '22 14:07 yairp03

Are you setting RightToLeft FlowDirection and the value in Device.FlowDirection is incorrect or also the UI is not updated correctly?

jsuarezruiz avatar Jul 06 '22 15:07 jsuarezruiz

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.

ghost avatar Jul 06 '22 15:07 ghost

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.

yairp03 avatar Jul 06 '22 18:07 yairp03

Is there any workaround for this? A way to get the supposed flow direction and set it manually on startup?

yairp03 avatar Jul 28 '22 00:07 yairp03

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

fazary avatar Oct 28 '22 13:10 fazary

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.

aljaiban avatar Jan 11 '23 19:01 aljaiban

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 ) : IMG_0240

Arabic( nothing shows):

IMG_0241

khagesh-medtronic avatar May 15 '23 03:05 khagesh-medtronic

Any updates 🤔

fazary avatar Jul 04 '23 15:07 fazary

I also faced this problem, unfortunately there is no solution

Simulator Screenshot - iPhone 14 - 2023-08-18 at 14 20 19

WAEL20221 avatar Aug 21 '23 17:08 WAEL20221

try adding this workaround NuGet PureWeen.Maui.FixesAndWorkarounds,
https://github.com/PureWeen/ShanedlerSamples/tree/main

khagesh-medtronic avatar Aug 22 '23 03:08 khagesh-medtronic

Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0. Can repro on iOS platform.

Zhanglirong-Winnie avatar Sep 06 '23 03:09 Zhanglirong-Winnie

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.