[TYPO3-mvc] Translation of a text in a fluid marker attributes

Alban Cousinié lists at mind2machine.com
Mon Apr 11 14:26:35 CEST 2011


Ok I just sorted it out : using the inline notation did the trick :

<f:be.buttons.icon uri="{f:uri.action(action:'new')}" icon="new_el"
title="{f:translate(key: tx_my_ext.my_label)}" />

Regards,

Alban


> -----Message d'origine-----
> De : typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-
> project-typo3v4mvc-bounces at lists.typo3.org] De la part de Alban Cousinié
> Envoyé : lundi 11 avril 2011 14:17
> À : typo3-project-typo3v4mvc at lists.typo3.org
> Objet : [TYPO3-mvc] Translation of a text in a fluid marker attributes
> 
> Hi everybody,
> 
> 
> 
> I am trying to code my first extbase/fluid extension and it has to be
> multiligual.
> 
> 
> 
> From what I have understood so far, a translated label can be fetched from
> the XML localization file using the following tag :
> 
> <f:translate key="tx_my_ext.my_label" />
> 
> 
> 
> Taking example on the extbase blog sample extension, now I see the
> following
> code with the hardcoded attribute title="Create new Job Offer" :
> 
> <f:be.buttons.icon uri="{f:uri.action(action:'new')}" icon="new_el"
> title="Create new Job Offer" />
> 
> 
> 
> Question : does anyone have a clue of how should such an attribute be
> translated ?
> 
> Note : I tested nesting <f:translate key="tx_my_ext.my_label" /> into the
> title attribute, but of course it didn't work as it is contrary to the
> fundamental syntax of the XML language.
> 
> 
> 
> Thanks for your answers,
> 
> 
> 
> Alban Cousinié
> 
> 
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list