Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (revision ) +++ t3lib/class.t3lib_befunc.php (revision ) @@ -2257,6 +2257,14 @@ return $noTitle; } + public static function sL() { + if (TYPO3_MODE == 'BE') { + return $GLOBALS['LANG']->sL($l); + } else { + return $GLOBALS['TSFE']->sL($l); + } + } + /** * Returns a human readable output of a value from a record * For instance a database record relation would be looked up to display the title-value of that record. A checkbox with a "1" value would be "Yes", etc. @@ -2304,7 +2312,7 @@ switch ((string) $theColConf['type']) { case 'radio': $l = self::getLabelFromItemlist($table, $col, $value); - $l = $GLOBALS['LANG']->sL($l); + $l = self::sL($l); break; case 'select': if ($theColConf['MM']) { @@ -2348,7 +2356,7 @@ } } else { $l = self::getLabelFromItemlist($table, $col, $value); - $l = $GLOBALS['LANG']->sL($l); + $l = self::sL($l); if ($theColConf['foreign_table'] && !$l && $TCA[$theColConf['foreign_table']]) { if ($noRecordLookup) { $l = $value; @@ -2363,7 +2371,7 @@ $r = self::getRecordWSOL($theColConf['neg_foreign_table'], -$rVal); } if (is_array($r)) { - $lA[] = $GLOBALS['LANG']->sL($rVal > 0 ? $theColConf['foreign_table_prefix'] : $theColConf['neg_foreign_table_prefix']) . self::getRecordTitle($rVal > 0 ? $theColConf['foreign_table'] : $theColConf['neg_foreign_table'], $r, FALSE, $forceResult); + $lA[] = self::sL($rVal > 0 ? $theColConf['foreign_table_prefix'] : $theColConf['neg_foreign_table_prefix']) . self::getRecordTitle($rVal > 0 ? $theColConf['foreign_table'] : $theColConf['neg_foreign_table'], $r, FALSE, $forceResult); } else { $lA[] = $rVal ? '[' . $rVal . '!]' : ''; } @@ -2378,12 +2386,12 @@ break; case 'check': if (!is_array($theColConf['items']) || count($theColConf['items']) == 1) { - $l = $value ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no'); + $l = $value ? self::sL('LLL:EXT:lang/locallang_common.xml:yes') : self::sL('LLL:EXT:lang/locallang_common.xml:no'); } else { $lA = Array(); foreach ($theColConf['items'] as $key => $val) { if ($value & pow(2, $key)) { - $lA[] = $GLOBALS['LANG']->sL($val[0]); + $lA[] = self::sL($val[0]); } } $l = implode(', ', $lA); @@ -2395,7 +2403,7 @@ $l = self::date($value) . ' (' . ($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') . - self::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . + self::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), self::sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')'; } elseif (t3lib_div::inList($theColConf['eval'], 'time')) { $l = self::time($value, FALSE);