[TYPO3-english] fluid translate inside inline notation

Sergio Catalá scatala.enet at gmail.com
Fri Jun 21 15:41:21 CEST 2013


Hi list,

I am trying to nest a "translate" viewhelper with inline notation inside 
another "translate" viewhelper, ans using an "if" too. I have:

     <f:translate
         key="templates.mail.content"
         arguments="{
             0: '{f:if(condition: \'{0: user.salutation.gender} == {0: 
1}\', then: \'{f:translate(key:\'global.mail.salutation.male\')}\', 
else: \'{f.translate(key:\'global.mail.salutation.female\')}\')}',
             .....
         }"
         />

My syntax is somehow incorrect, but I don't know what I am doing wrong. 
I understand I should escape every string that begins with "'". The "if" 
works well, as if I do the next:

     <f:translate
         key="templates.mail.content"
         arguments="{
             0: '{f:if(condition: \'{0: user.salutation.gender} == {0: 
1}\', then: \'global.mail.salutation.male\', else: 
\'global.mail.salutation.female\')}',
             .....
         }"
         />

the string "global.mail.salutation.male" or 
"global.mail.salutation.female" is shown in the email.

Any hints?

Thanks in advance,
Sergio



More information about the TYPO3-english mailing list