Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import Foundation
// MARK: - Localisation
struct Localised {
{% for enum in types.implementing.Localisable %}
struct {{ enum.name|replace:"SourceryLocaliser.",""|replace:".","_" }} {
{% for case in enum.cases %}
static var {{ case.name }}: String { return NSLocalizedString("{{ enum.name|replace:"SourceryLocaliser.",""}}.{{case.name|capitalize}}", comment: "") }
{% endfor %}
}
{% endfor %}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment