Skip to content

Instantly share code, notes, and snippets.

@bill350
Created March 22, 2019 19:32
Show Gist options
  • Save bill350/9ba751ffc62e5eacad82df8f5478308f to your computer and use it in GitHub Desktop.
Save bill350/9ba751ffc62e5eacad82df8f5478308f to your computer and use it in GitHub Desktop.
//swiftlint:disable identifier_name
public extension L10n {
public struct Plurals {
/// 1 alerte
/// 2 alertes
public static func alertsTitle(_ p1: Int) -> String {
return L10n.trPlurals("alerts_titles", count: p1)
}
}
}
//swiftlint:enable identifier_name
public extension L10n {
static func trPlurals(_ key: String, count: Int) -> String {
let format = NSLocalizedString(key, comment: "")
return String(format: format, arguments: [count])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment