I'm using the Lingo package for my Vapor solution see : https://github.com/vapor-community/Lingo-Vapor and this has been working perfect for 3 languages
Now I need plurals for a popup I'm creating :
for i in stride(from: 1, to: 12, by: 1) {
if let description = lingo?.localize("lbl_hour_s", locale: language, interpolations: ["count" : i]) {
option = FormFieldStringOption(key:String(i), label: description)
} else {
option = FormFieldStringOption(key:String(i), label: String(i))
}
duration.options.append(option)
}
My Json files are configured like this :
for en_US
"lbl_hour_s" : {"one" : "1 hour", "other" : "%{count} hours"},
for nl_BE
"lbl_hour_s" : {"one" : "%{count} uur", "many" : "%{count} uren", "other" : "%{count} uren"},
(I tried with the extra 'many' in nl, but still getting the same error in both cases :
Missing pluralization rule for locale: en_US. Will default to other
rule.
Is there something wrong with this ? It looks the same as the example from the docs :
"unread.messages": {
"one": "You have one unread message.",
"other": "You have %{count} unread messages."
or do I need some extra configuration to Lingo ? (found nothing in the docs for it)