What are common patterns for handling possible pluralization in message properties?
Posted
by
C. Ross
on Programmers
See other posts from Programmers
or by C. Ross
Published on 2013-11-03T01:04:53Z
Indexed on
2013/11/03
4:11 UTC
Read the original article
Hit count: 225
Obviously users like to see text properly pluralized, and pluralization schemes vary in the various written languages one may encounter. When internationalizing an app, what pattern(s) are useful for handling messages with possible pluralization? What about messages with multiple possible pluralization?
For example: "N review(s):"
One pattern would be
reviews.title.singular="{0} review:" reviews.title.singular="{0} reviews:"
And this may not support all languages.
Or a more complicated case: "Found M question(s) with N comment(s)." This would be difficult to support in English?
© Programmers or respective owner