[ZPT] Setting i18n:domain to a variable

José Henrique jhreis at gmail.com
Thu Nov 23 10:02:04 EST 2006


Use tal:attributes to set the values:

<h2 tal:define="statusMessage python:request.get('statusMessage');
                    domain python:request.get('domain')"
        tal:attributes="i18n:domain domain;
                        i18n:translate string:">someText</h2>

José Henrique.

2006/11/22, Josef Meile <jmeile at hotmail.com>:
>
> Hi,
>
> I'm wondering if something like this is possible:
> <h2 tal:define="statusMessage python:request.get('statusMessage');
>                 domain python:request.get('domain')"
>     i18n:translate=""
>     i18n:domain="domain" tal:content="statusMessage">someText</h2>
>
> I even replaced the i18n:domain directive by:
>
> i18n:domain="python:request.get('domain')"
>
> But it is not working for me. I always get the original message. I guess
> everything inside i18n:domain is interpreted as a string. I know I can
> do this programmatically, but it would be cool if I could do that
> directly in zpt.
>
> TIA,
> Josef
>
> _______________________________________________
> ZPT mailing list
> ZPT at zope.org
> http://mail.zope.org/mailman/listinfo/zpt
>


More information about the ZPT mailing list