extension String { func localized(from: String) -> String { return NSLocalizedString(self, tableName: from, value: self, comment: "") } func localizedFormat(from: String, _ arguments: CVarArg...) -> String { return String.localizedStringWithFormat(localized(from: from), arguments) } } let result2 = "total_word".localizedFormat(from: "MyLocalizable", 8) // 200 233 989 words let result2 = String.localizedStringWithFormat("total_word".localized(from: "MyLocalizable"), 8) // 8 words