Created
May 24, 2016 21:56
-
-
Save swilliams/099405b597bd17e3515f2574f2a6dc39 to your computer and use it in GitHub Desktop.
This file contains 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, comment: "") | |
} | |
} | |
// Which allows for: | |
"Hello world".localized |
Thank you very much for your time and your knowledge!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My memory is really foggy on this, but I remember creating the
localizable.strings
files myself. I believe Xcode has the capabilities of doing that now. You'd still need to populate those files with strings though. This site has a little more info: https://medium.com/lean-localization/ios-localization-tutorial-938231f9f881