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:
'Added <tal:block i18n:name="n" tal:replace="string:5"/> pictures
into queue';
Two rules to keep in mind:
1. PHPTAL isn't a dynamic/interpreted language. It's statically
compiled language (as far as the TAL part goes), and it doesn't parse
any tags at run time.
2. Translation strings are not allowed to contain any PHPTAL code.
They're just dumb data.
<div i18n:translate="session/message">
<tal:block i18n:name="n" tal:replace="string:5"/>
</div>
msgid: "Added ${n} pictures to the queue"
BTW: don't use structure keyword unless neccessary.
--
regards, Kornel
_______________________________________________
PHPTAL mailing list
[email protected]
http://lists.motion-twin.com/mailman/listinfo/phptal