Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- typealias Localized = String
- extension Localized {
- func localize() -> String {
- return NSLocalizedString(self, comment: "")
- }
- /// Localize plural string key
- func localize<T>(_ count: T) -> String {
- return String.localizedStringWithFormat(self.localize(), count as! CVarArg)
- }
- }
Add Comment
Please, Sign In to add comment