Last active
July 24, 2017 19:32
-
-
Save AlexZverusha/ef3fc4ce4525316f8460180fc8a51b57 to your computer and use it in GitHub Desktop.
Localized string extension
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
extension String { | |
var localized: String { | |
return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: "") | |
} | |
} | |
//example | |
//"test".localized | |
// "test " = "тест"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment