Skip to content

Instantly share code, notes, and snippets.

@popcornomnom
Last active September 18, 2019 14:23
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 popcornomnom/13efc96435068c335ab5fa73b356b3db to your computer and use it in GitHub Desktop.
Save popcornomnom/13efc96435068c335ab5fa73b356b3db to your computer and use it in GitHub Desktop.
iOS Localization Advices (Swift 5). Article link: http://www.popcornomnom.com/ios-localization-swift-5/
enum Localizable {
enum Global: String, LocalizableDelegate {
case cancel, close
}
enum WelcomePage: String, LocalizableDelegate {
case title = "welcomeTitle"
case ctaButtonTitle = "start"
case next
case cancel = "close"
}
enum InApp: String, LocalizableDelegate {
case title = "inAppTitle"
case subtitle = "inAppSubtitle"
case description = "inAppDescription"
var table: String? {
return "InApps"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment