Created
August 20, 2018 14:24
-
-
Save n1kron/bc42475b5452c4a397990d7f27e4844e 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: 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