Created
April 27, 2020 20:26
-
-
Save dimpiax/ec466914c84fbdddc539365a5030bace 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
@propertyWrapper | |
struct Localized<T: Localizable> { | |
private let key: LocalizationKey | |
var wrappedValue: T? = nil { | |
didSet { | |
wrappedValue?.set(localization: key) | |
} | |
} | |
init(_ key: LocalizationKey) { | |
self.key = key | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment