translating dynamic form input values

2 Messages Forum Options Options
Embed this topic
Permalink
Juan Pablo Di Lelle
translating dynamic form input values
Reply Threaded More
Print post
Permalink
Hi plone-i18n gurus,

I would like to know what's the best way to translate dynamic form input values, such as the following:

<form ... >

    <input type="submit"
           ...
          
tal:attributes="value python:'click here to ' + str(prettyOperationName)"
           i18n:attributes="value"/>

</form>

where the whole thing is in a loop, and each iteration displays a different input value.

Is it possible to use i18n:name in this context? Or do I have to resort to (ugly) translate() calls in the template?

Thank a lot!

--
Powered by tofu
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-i18n mailing list
Plone-i18n@...
https://lists.sourceforge.net/lists/listinfo/plone-i18n
Juan Pablo Di Lelle
Re: translating dynamic form input values
Reply Threaded More
Print post
Permalink
Here's a snippet from folder_factories.pt that answered my question:

                    <input class="standalone"
                         type="submit"
                         value="Add"
                         tabindex=""
                         i18n:attributes="value"
                         tal:define="ttitle python: here.utranslate(Title)"
                         tal:attributes="id python:normalizeString(Id);
                                         value python: here.utranslate('Add ${type}', {'type': ttitle})"
                         />


On 7/30/07, Juan Pablo Di Lelle <jdilelle@...> wrote:
Hi plone-i18n gurus,

I would like to know what's the best way to translate dynamic form input values, such as the following:

<form ... >

    <input type="submit"
           ...
          
tal:attributes="value python:'click here to ' + str(prettyOperationName)"
           i18n:attributes="value"/>

</form>

where the whole thing is in a loop, and each iteration displays a different input value.

Is it possible to use i18n:name in this context? Or do I have to resort to (ugly) translate() calls in the template?

Thank a lot!

--
Powered by tofu



--
Powered by tofu
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plone-i18n mailing list
Plone-i18n@...
https://lists.sourceforge.net/lists/listinfo/plone-i18n