PhoneNumberKit icon indicating copy to clipboard operation
PhoneNumberKit copied to clipboard

Support for showing flags with RTL languages

Open hojatdelfan opened this issue 1 year ago • 2 comments

Fix #548.

There are ways to know the language from right to left, but some of them don't work. Detecting it using the "AppleLanguages" seems to work fine.

hojatdelfan avatar Aug 30 '22 21:08 hojatdelfan

@hojideli using UIView.effectiveUserInterfaceLayoutDirection wouldn't be enough?

Source: https://developer.apple.com/documentation/uikit/uiview/1648536-effectiveuserinterfacelayoutdire

bguidolim avatar Aug 31 '22 08:08 bguidolim

@bguidolim Using UIView.effectiveUserInterfaceLayoutDirection is not supported for iOS version 9. By using it, the view itself is used to detect, not the app language. I also used userInterfaceLayoutDirection, but they did not recognize the app language. Source: https://developer.apple.com/documentation/appkit/nsapplication/1428556-userinterfacelayoutdirection

Finally, I used NSLocale to recognize the language and that seems to work fine. Could you review it, please?

hojatdelfan avatar Aug 31 '22 20:08 hojatdelfan

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 31 '22 04:10 github-actions[bot]