[Catalyst] Proper ngettext with Catalyst

John Siracusa siracusa at gmail.com
Sun Feb 1 20:49:27 GMT 2009


On 2/1/09 3:31 PM, Cosimo Streppone wrote:
> In data 31 gennaio 2009 alle ore 17:29:39, Nikolai Prokoschenko
>> An example: if I wanted to translate the string
>> "I have $x apples" I would write using gettext: ngettext("I have %d
>> apple", "I have %d apples", $x). Thus xgettext would produce:
> 
> What about the zero form?
> Some languages have a totally different idea of
> the zero/single/plural form.

I believe some languages have a different form for "dual" as well.  (All of
which points strongly towards the use of English text as a message id/key
being a bad idea.)

-John





More information about the Catalyst mailing list