PhoneNumberKit
PhoneNumberKit copied to clipboard
Support for showing flags with RTL languages
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.
@hojideli using UIView.effectiveUserInterfaceLayoutDirection
wouldn't be enough?
Source: https://developer.apple.com/documentation/uikit/uiview/1648536-effectiveuserinterfacelayoutdire
@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?
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.