[Typo3-dev] getting values from locallang_db.php for frontend output

Peter Niederlag niederlag at ikd01.de
Tue Jun 21 16:41:00 CEST 2005


Hi,

JoH schrieb:
>>>The question is: What is the preferrable way to insert labels from
>>>locallang_db.php into the output of the FE-plugin(s)?
>>
>>t3lib_div has something for everyone:
>>
>>t3lib_div::readLLfile($fileRef,$langKey) seems to be the right way.
>>
> 
> 
> unfortunately this seems to be part of $lang for the backend but it is not
> available via t3lib_div::readLLfile
> (Or has this changed from 3.7 to 3.8? - We are using 3.7 with this project)
> Using the function in the PHP code of the plugin gives us the following
> error message:
>  Call to undefined function: readllfile() ... blah
> 
> Searching the different sections of extdeveval I found out that there is
> something like "function readLLfile($fileRef)" in sysext/lang/lang.php but
> as far as I understood this can't be used inside FE-plugins.
> Any other ideas?

it is definitly in t3lib_div as of 3.8

if u use it in FE make sure to do a
'require_once(t3lib . 'class.t3lib_div.php'); or something like this.
t3lib_div is afaik not available in FE by default?

HtH,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
http://www.typo3partner.net * professional services network *




More information about the TYPO3-dev mailing list