let completedRuns = 1
let totalRuns = 2
let format = NSLocalizedString("__id_runs", comment: "")
let translatedString = String(format: format, completedRuns, totalRuns)
The result is correct: One of 2 runs completed
The same operation with L10n-swift ends with a wrong result because I can pass just one value as arg parameter for plural() function
let value = l10n.plural(for: "__id_runs", resource: nil, fittingWidth: nil, arg: 1, converting: { $0 })
which results in a wrong string: One %2$#@lu_total_runs@
This is a bit complicated issue, but you're right. I do not support multiple arguments for the plural form. I will try to add this functionality in the next version
Hi guys, I would to use this lib but I had found there is not support for multiple arguments with plurals right?
For example, this is the value in
Localizable.strings
:and and
Localizable.stringsdict
:This is the native call to use it:
The result is correct:
One of 2 runs completed
The same operation with L10n-swift ends with a wrong result because I can pass just one value as
arg
parameter forplural()
functionwhich results in a wrong string:
One %2$#@lu_total_runs@