On 18-08-2009 at 02:40:31 Alister Cameron <alister.came...@cameroncreative.com> wrote:
I want to handle i18n as well as variable insertion (and conditions) from
WordPress... as per this example:

<h3><?php printf($comment_count > 1 ? __('<span>%d</span> Comments',
'thematic') : __('<span>One</span> Comment', 'thematic'), $comment_count)
?></h3>

What do you suggest as the most elegant way to mark that up?

<h3 tal:condition="php:comment_count GT 1" i18n:translate="structure"><span i18n:name="count" tal:content="comment_count"/> Comments</h3> <h3 tal:condition="php:comment_count == 1" i18n:translate="structure"><span>One</span> Comment</h3>


if you need it to work with existing __() function, then you'll need to change ${count} to %d.

--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to