4 ms·
To 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 i
by wizzwizz4 4y ago
To 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.