[TYPO3-dev] Including LL file in a cronjob script
Sacha Ligthert
sacha at ligthert.net
Mon Jan 7 14:52:10 CET 2008
Hi list,
I am writing a cronjob script that uses htmlmail and locallang. But I
can't seem to load up $LANG with the locallang.xml file I specify.
I copied major parts of the code of directmail dmailerd.phpcron and
class.dmailerd.php, so this isn't the problem. Except that I couldn't
use a locallang file I created for the backend.
I used the following code:
/** Start Code */
class invoicemailer extends t3lib_htmlmail {
function processcrontab($era) {
require (PATH_typo3.'sysext/lang/lang.php');
$LANG = t3lib_div::makeInstance('language');
$LANG->init("default");
$LANG->includeLLFile('EXT:ste_invoice/mod1/locallang.xml');
/** End */
Creating the $LANG instance is cookie and it works as it should.
But I can't seem to include the locallang.xml as it should. I followed
the function path till ./t3lib/class.t3lib_div.php's readLLfile(). This
accesses readLLXMLfile() which in turn returnes no value what so ever.
Does anybody know how I can include the mod1/locallang.xml file from the
invoicemailer class?
Greetings,
Sacha Ligthert
PS: My apologies if I left something out or my mail is blurry. My foot
is hurting like hell and its distorting my concentration.
More information about the TYPO3-dev
mailing list