[Zope3-Users] PT, i18n and dynamic attributes...how to?
Marius Gedminas
mgedmin at b4net.lt
Fri Feb 2 07:21:57 EST 2007
On Fri, Feb 02, 2007 at 08:20:42AM +0100, Sascha Ottolski wrote:
> Sure. It might very well be my stupidity, but up to now I couldn't find a
> solution to this problem. Note that it's not solved like most examples would
> suggest with
>
> <p i18n:translate="">
> Hi, please <a tal:attributes="href view/click_url"
> i18n:name="click">click</a> here!
> </p>
>
> cause that would replace the whole <a> tag, so the tal:attributes gets lost
> (and none of the docs I've seen so far has got an example for my case). If
> I'm not mistaken, that would result in
>
> msgid="Hi, please ${click} here!"
>
> which is certainly not what I want.
How about
<p i18n:translate="">
Hi, please <a tal:attributes="href view/click_url"
i18n:name="click"
i18n:translate="">click</a> here!
</p>
?
That should give you two msgids:
Hi, please $click here!
and
click
.
Marius Gedminas
--
Life was simple before World War II. After that, we had systems.
-- Grace Murray Hopper, 1987
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20070202/506dccaa/attachment.bin
More information about the Zope3-users
mailing list