3 ms·
Software (including web frontends) that can't properly pluralize quantities in English. It goes "0 Days, 1 Day, 2 Days". Not "0 Days, 1 Days, 2 Days". Or, wor
by joezydeco 4y ago
Software (including web frontends) that can't properly pluralize quantities in English.
It goes "0 Days, 1 Day, 2 Days".
Not "0 Days, 1 Days, 2 Days". Or, worse, "0 Day(s), 1 Day(s), 2 Day(s)".
- wizzwizz4 4y agoTo be fair, pluralisation is hard. If you want it to work in English, but you want your software to support translations, you have to call a function and give it all the information necessary for all languages you support. That includes: • are there 3 or 4? (Plural isn't just zero/one/many in every language.) • is the quantity small-ish, or large-ish, compared to normal? • what's the grammatical position of the noun you want to pluralise? You'd have to have something a lot more sophisticated than string substitution. And there isn't really a pressing need for it. Day(s) works fine.