[TYPO3-dev] PI language labels

J. Lingott jbl at deweblop.de
Mon Aug 30 11:23:18 CEST 2010


  Dmitry Dulepov wrote:
> Hi!
>
> J. Lingott wrote:
>> Well, the extension is a XCLASS extension for another extension (t.b.e.
>> tt_news) using the processSingleViewLink hook. The loading by
>> pi_loadLL() is done in the constructor of the class and the fetching
>> with pi_getLL() occurs in a sub method of the hook method.
> The constructor is not a right place. Labels should be fetched inside the
> main() method because only that methods gets the configuration, which is
> necessary for language loading.
>

I am fetching the config by using $this->conf = 
$GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->extKey.'.'], as it is 
not a plugin, but a XCLASS hook class. Either if doing it before or 
after pi_loadLL() the result is the same. Maybe the way of getting the 
config with using pi_loadLL() is not working?

Also, for testing issues moved the config fetching and pi_loadLL() into 
the hook method, but same result.

>> Am always using the class object to get the language data, not the
>> parent object from tt_news. What else besides using my own object could
>> I do to prevent the routine you described?
> I am not sure what you mean.

What I meant is loading is done by $this->pi_loadLL(), fetching by 
$this->pi_getLL() and not by using the parent object of tt_news which 
would be provided by the hook method processSingleViewLink($linkWrap, 
$url, $params, $obj). But as well, if using the parent object the result 
is the same.

Pastebin'd the source code if you want to have a look: 
http://pastebin.com/Vk8upbe7.




More information about the TYPO3-dev mailing list