[TYPO3-mvc] Form.select with translated options

Jochen Rau jochen.rau at typoplanet.de
Mon Apr 26 17:55:44 CEST 2010


Hi.

On 26.04.10 17:42, Marc Bastian Heinrichs wrote:
> Hej,
>
> I tried different approaches to create an form select with translated
> options but either the complete content would not be rendered or the
> option label is empty. Is there bug or do I anything wrong?
>
> Here are two of the versions I tried:
>
> <f:form.select name="filter" id="filterbox" options="{0:
> '{f:translate(key: 'lang_key_1')}', 1: '{f:translate(key:
> 'lang_key_2')}'}">
> <select>
> <option value="">###dummy###</option>
> </select>
> </f:form.select>

Try to escape the Quotes:

<f:form.select name="filter" id="filterbox" options="{0: 
'{f:translate(key: \'lang_key_1\')}', 1: '{f:translate(key: 
\'lang_key_2\')}'}">
     <select>
         <option value="">###dummy###</option>
     </select>
</f:form.select>

Regards
Jochen


More information about the TYPO3-project-typo3v4mvc mailing list