[TYPO3-mvc] Fluid variable in key of translate viewhelper?

Tobias Liegl tliegl at gmail.com
Fri Jul 27 10:39:48 CEST 2012


Hi Stefan,

thanks for your answer. I found the problem! I was also testing around 
with the "snowbabel" extension (where an editor can translate labels for 
extionsions in the backend) and it generates static locallang files. And 
they weren't up to date ...

Tobi


Am 27.07.12 09:37, schrieb Stefan Frömken:
> Am 27.07.2012 09:19, schrieb Stefan Frömken:
>> Am 27.07.2012 09:13, schrieb Tobias Liegl:
>>> Hi,
>>>
>>> is it possible to use a variable in the key of the translate viewhelper?
>>> Something like this?
>>>
>>> <f:translate key="tx_myext.month.{month}" />
>>>
>>> {month} is 01 or 02 in my case and tx_myext.month.01 is defined as
>>> January in the locallang file. But unluckily it doesn't work.
>>>
>>> Tobi
>>
>> Hello Tobi,
>>
>> you're right. Using variables within a key is not allowed. I solved it
>> with my own ViewHelper but you also can use the VarViewHelper in the
>> directory of the fed extension.
>>
>> Stefan
> Sorry Tobi,
>
> my mistake. Of cause it works. I used it in my own project this way:
>
> <f:translate
> key="table_header_col.{formData.selectedView}.{formData.ucaction}.{column.Field}"
> htmlEscape="false" />
>
> Stefan
>



More information about the TYPO3-project-typo3v4mvc mailing list