[TYPO3-project-formidable] Use customtags to translate messages
Manuel Rego Casasnovas
mrego at igalia.com
Tue Jun 12 10:16:02 CEST 2007
Hi Jerome,
Thanks for your help ;-)
I didn't know this option for the HTML template, but it's a very good
option.
With this option my modification makes no sense.
Bye,
Rego
--
Manuel Rego Casasnovas
Computer Science Engineer
mailto:mrego at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com
Jerome Schneider escribió:
> 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
>>
>>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
More information about the TYPO3-project-formidable
mailing list