Created
April 9, 2019 13:01
-
-
Save ashour/a27b4600a2c59a0a847e71ddfbfeb2be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension Locale | |
{ | |
var isRightToLeft: Bool | |
{ | |
get | |
{ | |
if let languageCode = self.languageCode | |
{ | |
return Locale.characterDirection(forLanguage: languageCode) == | |
.rightToLeft | |
} | |
return false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment