public extension String { | |
public func localize(tableName tableName: String? = nil, bundle: NSBundle = NSBundle.mainBundle(), comment: String = "") -> String { | |
return NSLocalizedString( | |
self, | |
tableName: tableName, | |
bundle: bundle, | |
value: "", | |
comment: comment) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
String extension to allow for a cleaner use of localized strings.
Usage:
Or if you have other
Localizable.strings
files:Or if you are in a different target: