فهرست منبع

add plurals localization extension to Strings class with fallback to english

cyberta 6 سال پیش
والد
کامیت
820c372659
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      deltachat-ios/Helper/Extensions.swift

+ 6 - 0
deltachat-ios/Helper/Extensions.swift

@@ -59,6 +59,12 @@ extension String {
 			else { return value }
 		return NSLocalizedString(stringID, bundle: bundle, comment: "")
 	}
+
+	static func localized(stringID: String, count: Int) -> String {
+		let formatString: String = localized(stringID)
+		let resultString: String = String.localizedStringWithFormat(formatString, count)
+		return resultString;
+	}
 }
 
 extension URL {