Skip to content

Instantly share code, notes, and snippets.

@tifoaudii
Created July 22, 2021 04:31
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/0f954b1a38c3f8421859dd8fa6666dbc to your computer and use it in GitHub Desktop.
Save tifoaudii/0f954b1a38c3f8421859dd8fa6666dbc to your computer and use it in GitHub Desktop.
enum Language {
case indonesia
case thailand
case vietnam
}
protocol Localizable {
static var languages: [Language] { get }
}
protocol ImmutableLocalizable: Localizable {
func translate(to language: Language) -> Self
}
protocol MutableLocalizable: Localizable {
mutating func translate(to language: Language)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment