Skip to content

Instantly share code, notes, and snippets.

@n1kron
Created August 20, 2018 14:24
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 n1kron/bc42475b5452c4a397990d7f27e4844e to your computer and use it in GitHub Desktop.
Save n1kron/bc42475b5452c4a397990d7f27e4844e to your computer and use it in GitHub Desktop.
enum Language: String {
case ru = "ru"
case en = "en"
var collectionsUrlKey: String {
switch self {
case .ru: return "/versions/2/locals/ru/collections"
case .en: return "/versions/2/locals/en/collections"
}
}
var storiesUrlKey: String {
switch self {
case .ru: return "/versions/2/locals/ru/stories"
case .en: return "/versions/2/locals/en/stories"
}
}
var languageTitle: String {
switch self {
case .ru: return "Русский"
case .en: return "English"
}
}
static let all: [Language] = [.ru, .en]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment