Created
July 22, 2021 04:31
-
-
Save tifoaudii/0f954b1a38c3f8421859dd8fa6666dbc to your computer and use it in GitHub Desktop.
This file contains 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
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