[TYPO3-english] pi_getLL - I guess I'm doing something wrong

Bernd Wilke t3ng at pi-phi.tk
Mon Mar 28 08:33:17 CEST 2011


On 03/25/2011 10:48 AM, Martin Mädler wrote:
> Hi,
>
> I manipulated the tt_address extension to have a few more fields
> including short_biography. To do so I added them to the db table and
> changed tca.php and locallang_tca.xml. The new fields show up in the
> backend with the right translation and work. So far so good.
> I wanted to access the language variables from within the extension
> (i.e. class.tx_ttaddress_pi1.php) and found the function pi_getLL. But
> it doesn't seem to work right.
> When I call
>
> $this->pi_getLL('tt_address.short_biography', 'Alternate value')
>
> all I get is the alternate value. But for values from pi1/locallang.xml
> the function seems to return the correct values.
> For example
>
> $this->pi_getLL('group1', 'A group title');
>
> How can I get access to the language items of locallang_tca.xml or do I
> have to put the exact same values into locallang.xml and thus repeating
> them unnecessarily?

You had to  load the tt_address-locallang-file before you can use it.
Normaly just your locallang-file is loaded.

some ways to load more than one locallang you can find here:
http://pi-phi.de/secondlocallang.html (german)

bernd


More information about the TYPO3-english mailing list