Feature #15073 » 1630.diff
/var/www/html/typo3/sysext/cms/tslib/class.tslib_pibase-1630.php 2005-12-13 14:00:25.134030448 +0100 | ||
---|---|---|
var $altLLkey=''; // Pointer to alternative fall-back language to use.
|
||
var $LLtestPrefix=''; // You can set this during development to some value that makes it easy for you to spot all labels that ARe delivered by the getLL function.
|
||
var $LLtestPrefixAlt=''; // Save as LLtestPrefix, but additional prefix for the alternative value in getLL() function calls
|
||
var $LLsuffixArray = Array(); // suffixes which should be used to get the texts in pi_getLL
|
||
var $pi_isOnlyFields = 'mode,pointer';
|
||
var $pi_alwaysPrev = 0;
|
||
... | ... | |
* @return string The value from LOCAL_LANG.
|
||
*/
|
||
function pi_getLL($key,$alt='',$hsc=FALSE) {
|
||
if (isset($this->LOCAL_LANG[$this->LLkey][$key])) {
|
||
$word = $GLOBALS['TSFE']->csConv($this->LOCAL_LANG[$this->LLkey][$key], $this->LOCAL_LANG_charset[$this->LLkey][$key]); // The "from" charset is normally empty and thus it will convert from the charset of the system language, but if it is set (see ->pi_loadLL()) it will be used.
|
||
} elseif ($this->altLLkey && isset($this->LOCAL_LANG[$this->altLLkey][$key])) {
|
||
$word = $GLOBALS['TSFE']->csConv($this->LOCAL_LANG[$this->altLLkey][$key], $this->LOCAL_LANG_charset[$this->altLLkey][$key]); // The "from" charset is normally empty and thus it will convert from the charset of the system language, but if it is set (see ->pi_loadLL()) it will be used.
|
||
} elseif (isset($this->LOCAL_LANG['default'][$key])) {
|
||
$word = $this->LOCAL_LANG['default'][$key]; // No charset conversion because default is english and thereby ASCII
|
||
} else {
|
||
$word = $this->LLtestPrefixAlt.$alt;
|
||
$LLsuffixArray = array();
|
||
$LLsuffixArray = array_merge($LLsuffixArray, $this->LLsuffixArray);
|
||
$LLsuffixArray[] = '';
|
||
reset ($LLsuffixArray);
|
||
$bWord = false;
|
||
$word = '';
|
||
foreach ($LLsuffixArray as $k1 => $LLsuffix) {
|
||
$newkey = $key.$LLsuffix;
|
||
|
||
// The "from" charset in the conversions below is normally empty and thus it will convert from the charset of the system language, but if it is set (see ->pi_loadLL()) it will be used.
|
||
if (isset($this->LOCAL_LANG[$this->LLkey][$newkey])) {
|
||
$word = $GLOBALS['TSFE']->csConv($this->LOCAL_LANG[$this->LLkey][$newkey], $this->LOCAL_LANG_charset[$this->LLkey][$newkey]);
|
||
$bWord = true;
|
||
break;
|
||
} elseif ($this->altLLkey && isset($this->LOCAL_LANG[$this->altLLkey][$newkey])) {
|
||
$word = $GLOBALS['TSFE']->csConv($this->LOCAL_LANG[$this->altLLkey][$newkey], $this->LOCAL_LANG_charset[$this->altLLkey][$newkey]);
|
||
$bWord = true;
|
||
break;
|
||
}
|
||
}
|
||
|
||
if (!$bWord) {
|
||
if (isset($this->LOCAL_LANG['default'][$key])) {
|
||
$word = $this->LOCAL_LANG['default'][$key]; // No charset conversion because default is english and thereby ASCII
|
||
} else {
|
||
$word = $this->LLtestPrefixAlt.$alt;
|
||
}
|
||
}
|
||
|
||
$output = $this->LLtestPrefix.$word;
|
||
if ($hsc) $output = htmlspecialchars($output);
|
||
|
||
return $output;
|
||
}
|
||
- « Previous
- 1
- 2
- Next »