Re: [PHPTAL] i18n plural forms

2010-01-08 Thread Marcin Głowacki
Thanks for your advice @phptal plural forms. It is working but i stuck on other problem - how to add plural translation in a tal variable? for example: div i18n:translate=structure session/message/ and session/message for $n = 5 looks like: 'Added tal:block i18n:name=n tal:replace=string:5/

Re: [PHPTAL] i18n plural forms

2010-01-08 Thread Kornel Lesinski
On 8 Jan 2010, at 17:21, Marcin Głowacki wrote: Thanks for your advice @phptal plural forms. It is working but i stuck on other problem - how to add plural translation in a tal variable? for example: div i18n:translate=structure session/message/ and session/message for $n = 5 looks like:

Re: [PHPTAL] i18n plural forms

2010-01-08 Thread Marcin Głowacki
Kornel Lesinski pisze: On 8 Jan 2010, at 17:21, Marcin Głowacki wrote: Thanks for your advice @phptal plural forms. It is working but i stuck on other problem - how to add plural translation in a tal variable? for example: div i18n:translate=structure session/message/ and session/message

Re: [PHPTAL] i18n plural forms

2010-01-07 Thread Kornel Lesiński
On 06-01-2010 at 21:13:55 Marcin Głowacki panglowa...@gmail.com wrote: How to use gettext plural forms in PO file? I've added suitable header (Plural-Forms: nplurals=2; plural=n != 1;\n - for english) and tried in different ways: msgid picture msgid_plural pictures msgstr[0] picture

Re: [PHPTAL] i18n plural forms

2010-01-07 Thread kaaposc
2010/1/7 Kornel Lesiński kor...@aardvarkmedia.co.uk        if (false === strpos('${number}', $key))        {                $value = gettext($key);        }        else        {                $value = ngettext($key, $key, $this-_vars['number']);        } The problem is, as you see,