[TYPO3-project-formidable] Use customtags to translate messages

Jerome Schneider j.schneider at ameos.com
Tue Jun 12 09:56:46 CEST 2007


Hello Manuel,

I have an even simpler way to achieve this:

in your HTML template, you can directly use 
{LLL:EXT:my_ext/pi1/locallang.xml:tx_myext_pi1.next} tags that will be 
translated :)


Best regards,
Jerome Schneider

Manuel Rego Casasnovas a écrit :
> Hello everyone.
> 
> Sometimes I need to put in my templates messages, but I need that this
> messages are translated in the frontend user language. For now I use a
> custom tag to do this the next way:
> <customtags>
>     <tag_next>
>         <name>next</name>
>         <value>
>             <userobj>
>                 <php>
>                     <![CDATA[
>                         return
> $this->_oParent->pi_getLL('tx_myext_pi1.next');
>                     ]]>
>                 </php>
>             </userobj>
>         </value>
>     </tag_next>
> </customtags>
> 
> And in my template I can use '{next}' to get the message translated.
> 
> 
> I thank that can be a good option use the next XML config:
> <customtags>
>    <tag_next>
>       <name>next</name>
>       <value>LLL:EXT:my_ext/pi1/locallang.xml:tx_myext_pi1.next</value>
>    </tag_next>
> </customtags>
> 
> To get this I've modified the line 3010 for the next code:
> $value = $this->_getLLLabel($aTag["value"]);
> 
> With this little modification I can simplify a lot my XML config files.
> 
> I don't know if this is a good option to add to the next FORMidable release.
> 
> Bye,
>    Rego
> 


More information about the TYPO3-project-formidable mailing list