Skip to content

Instantly share code, notes, and snippets.

@bill350
Created March 22, 2019 18:54
Show Gist options
  • Save bill350/06c6339489f7d459b0127633706b24dd to your computer and use it in GitHub Desktop.
Save bill350/06c6339489f7d459b0127633706b24dd to your computer and use it in GitHub Desktop.
/// ...
/// The tr() method to update with the Lokalise call:
extension {{enumName}} {
private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = Lokalise.shared.localizedString(forKey: key, value: nil, table: table)
return String(format: format, locale: Locale.current, arguments: args)
}
}
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment