Vielleicht hilft dir das weiter. Habe ich selbst aber auch nur gefunden aber es funktioniert echt gut.
PHP-Code:
<?PHP
header('Content-Type: text/html; charset=UTF-8');
// Exit, if script is called directly (must be included via eID in index_ts.php)
if (!defined ('PATH_typo3conf')) die ('Could not access this script directly!');
require_once(PATH_tslib.'class.tslib_pibase.php');
/* Fake class LL support */
class csConvObj {
function parse_charset() {
return 'utf-8';
}
function utf8_decode($l,$c) {
return $l;
}
}
$TSFE = new stdClass;
$TSFE->csConvObj = new csConvObj;
class DEIN KLASSEN NAME extends tslib_pibase {
function main() {
global $TSFE;
$feUserObj = tslib_eidtools::initFeUser(); // Initialize FE user object,
tslib_eidtools::connectDB(); //Connect to database
// Sprache aus GET-Variable auslesen
// Wenn Variable fehlt, dann Fallback auf 'default'
$this->lang = t3lib_div::_GET('lang');
if($this->lang == '') $this->lang = 'default';
// locallang.xml parsen
$LOCAL_LANG = t3lib_div::readLLfile('EXT:DEIN EXTENSION NAME/pi1/locallang.xml',$this->lang);
$LOCAL_LANG[$this->lang]['DEIN LABEL']
}
$output = t3lib_div::makeInstance('DEIN KLASSEN NAME');
$output->main();
?>