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
import Foundation | |
// Usage "String".localize will search for "String" key in Localizeble | |
// Works for all types that conform CustomStringConvertible protocol, e.g. Int, Float. | |
// Raw value will be converted to string and used as key, e.g. | |
// 10.localize, will search for "10" key. | |
// If key not exists, then string value will be returned | |
// Gist: https://gist.github.com/alsedi/357c99ff6d138cf94804 | |
extension CustomStringConvertible { |
NewerOlder