top | item 8263105

Pluralizing Translations in i18n

19 points| pan_sarin | 11 years ago |2n.pl | reply

8 comments

order
[+] xtrumanx|11 years ago|reply
For those confused (like I was at first); judging by the post, this is I18n pluralization in Ruby on Rails.
[+] progx|11 years ago|reply
Pluralization is really old, gnu gettext solve this long time ago (1995).

http://www.gnu.org/software/gettext/manual/gettext.html

But you are right, many projects not support this, many don't know it or they are not interessted in other languages.

[+] declension|11 years ago|reply
Yep, gettext has been working well for decades (and ported to many languages), though the syntax is a little clunky I find.
[+] ArthurClemens|11 years ago|reply
Polish has 3 plural forms: 1: When the number is 1 2: When the number ends in 2,3,4, but not 12,13,14 3: For all other numbers

It beats me how translators would use "few" for plural form 2 (which includes 22, 33, 44). "Zero" and "other" are actually the same form. A good translation tool would spare the effort of entering the same information twice.

How would this work for Chinese, where all numbers are treated the same?

I would never present these keywords to translators, but instead show the full explanation like in the plural forms above.

[+] ygra|11 years ago|reply
Translators should know both the source and target language well enough to know the rules for the different plural forms. Using a name here is probably just to have a key for them (and frankly, better than gettext's approach). The correct name apparently would be singular, plural, genitive plural, if I'm reading Wikipedia right, but that's a bit cumbersome to type every time.
[+] gpvos|11 years ago|reply
Interesting to see the pluralization rules for so many languages expressed so succinctly.

Apparently in Polish 11 gets the "many" form (:other in this Ruby library), but 12 to 14 get the "few" form, like 2 to 4. But in Russian and a few other Slavic languages, 11 gets the "one" form.

[+] Octplane|11 years ago|reply
You probably mean useful. And known.
[+] declension|11 years ago|reply
+1: OP probably should have checked the English grammar and spelling when writing about... grammar and spelling