Created
March 27, 2018 21:58
-
-
Save douglaszaltron/c0b579e2fff9f47e14a7f135c667f124 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 | |
public struct UIKitLocalizedString { | |
public static func forKey(_ key: String) -> String { | |
guard let bundle = Bundle(identifier: "com.apple.UIKit") else { return key} | |
let localizedString = bundle.localizedString(forKey: key, value: nil, table: nil) | |
return localizedString | |
} | |
} | |
extension UIKitLocalizedString { | |
public static var ok: String { | |
return UIKitLocalizedString.forKey("OK") | |
} | |
public static var cancel: String { | |
return UIKitLocalizedString.forKey("Cancel") | |
} | |
public static var edit: String { | |
return UIKitLocalizedString.forKey("Edit") | |
} | |
public static var done: String { | |
return UIKitLocalizedString.forKey("Done") | |
} | |
public static var save: String { | |
return UIKitLocalizedString.forKey("Save") | |
} | |
public static var delete: String { | |
return UIKitLocalizedString.forKey("Delete") | |
} | |
public static var undo: String { | |
return UIKitLocalizedString.forKey("Undo") | |
} | |
public static var redo: String { | |
return UIKitLocalizedString.forKey("Redo") | |
} | |
public static var compose: String { | |
return UIKitLocalizedString.forKey("Compose") | |
} | |
public static var add: String { | |
return UIKitLocalizedString.forKey("Add") | |
} | |
public static var reply: String { | |
return UIKitLocalizedString.forKey("Reply") | |
} | |
public static var action: String { | |
return UIKitLocalizedString.forKey("Action") | |
} | |
public static var organize: String { | |
return UIKitLocalizedString.forKey("Organize") | |
} | |
public static var trash: String { | |
return UIKitLocalizedString.forKey("Trash") | |
} | |
public static var bookmarks: String { | |
return UIKitLocalizedString.forKey("Bookmarks") | |
} | |
public static var search: String { | |
return UIKitLocalizedString.forKey("Search") | |
} | |
public static var refresh: String { | |
return UIKitLocalizedString.forKey("Refresh") | |
} | |
public static var stop: String { | |
return UIKitLocalizedString.forKey("Stop") | |
} | |
public static var camera: String { | |
return UIKitLocalizedString.forKey("Camera") | |
} | |
public static var play: String { | |
return UIKitLocalizedString.forKey("Play") | |
} | |
public static var pause: String { | |
return UIKitLocalizedString.forKey("Pause") | |
} | |
public static var rewind: String { | |
return UIKitLocalizedString.forKey("Rewind") | |
} | |
public static var forward: String { | |
return UIKitLocalizedString.forKey("Forward") | |
} | |
public static var loading: String { | |
return UIKitLocalizedString.forKey("Loading") | |
} | |
public static var photoLibrary: String { | |
return UIKitLocalizedString.forKey("Photo Library") | |
} | |
public static var fastForward: String { | |
return UIKitLocalizedString.forKey("Fast Forward") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment