Phorum / Core

The core of Phorum
http://www.phorum.org
68 stars 34 forks source link

Implement correct localization of plural forms #687

Open Phorum opened 13 years ago

Phorum commented 13 years ago

It would be good to have correct localizations for messages with plural forms. In English, it is phrases like "1 more file" and "2 more files" and many more others. Without such feature there is no way to make good and correct localization. (This was mentioned in [http://www.phorum.org/phorum5/read.php?14,129305 forum thread] but ticket was never created, as I find).

For reference, here is how it is done in gettext - [http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms Plural-forms]

For example, it stores information of how to select right plural form in such way: {{{ Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; }}}

If there is any ideas or development in this area, please point me at it.

Reported by: Alexey Torkhov atorkhov@gmail.com Imported from TRAC: http://trac.phorum.org/ticket/789

Phorum commented 13 years ago

By: brian