Skip to content

Instantly share code, notes, and snippets.

@tifoaudii
Created July 22, 2021 04:49
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 tifoaudii/86eb551f4f160acb4bc7f0647cb0aa16 to your computer and use it in GitHub Desktop.
Save tifoaudii/86eb551f4f160acb4bc7f0647cb0aa16 to your computer and use it in GitHub Desktop.
extension UITextView: MutableLocalizable {
func translate(to language: Language) {
switch language {
case .indonesia:
text = "Tolong"
case .thailand:
text = "..."
case .vietnam:
text = "..."
}
}
static var languages: [Language] {
[.indonesia, .thailand]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment