Skip to content

Instantly share code, notes, and snippets.

@dimpiax
Created April 27, 2020 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimpiax/ec466914c84fbdddc539365a5030bace to your computer and use it in GitHub Desktop.
Save dimpiax/ec466914c84fbdddc539365a5030bace to your computer and use it in GitHub Desktop.
@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