Project

General

Profile

Feature #17368 » languageCategories.diff

Administrator Admin, 2007-08-22 23:17

View differences:

t3lib/class.t3lib_div.php (working copy)
* @param string TYPO3 language key, eg. "dk" or "de" or "default"
* @return array LOCAL_LANG array in return.
*/
function readLLXMLfile($fileRef,$langKey) {
function readLLXMLfile_($fileRef,$langKey) {
if (is_object($GLOBALS['LANG'])) {
$csConvObj = &$GLOBALS['LANG']->csConvObj;
......
// Read and parse XML content:
$local_xmlString = t3lib_div::getUrl($localized_file);
$local_xmlContent = t3lib_div::xml2array($local_xmlString);
t3lib_div::debug($xmlContent,'$local_xmlContent');
$LOCAL_LANG[$langKey] = is_array($local_xmlContent['data'][$langKey]) ? $local_xmlContent['data'][$langKey] : array();
// Checking if charset should be converted.
......
}
?>
?>
typo3/sysext/cms/tslib/class.tslib_pibase.php (working copy)
* @return string The value from LOCAL_LANG.
*/
function pi_getLL($key,$alt='',$hsc=FALSE) {
$langCategory=$GLOBALS['TSFE']->tmpl->setup['config.']['language.']['category'];
if($key=='term1')t3lib_div::debug($this->LLkey,'test');
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.
if(isset($langCategory) && isset($this->LOCAL_LANG[$this->LLkey][$langCategory][$key]))
$word = $GLOBALS['TSFE']->csConv($this->LOCAL_LANG[$this->LLkey][$langCategory][$key], $this->LOCAL_LANG_charset[$this->LLkey][$langCategory][$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.
else
$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.
if(isset($langCategory) && isset($this->LOCAL_LANG[$this->altLLkey][$langCategory][$key]))
$word = $GLOBALS['TSFE']->csConv($this->LOCAL_LANG[$this->altLLkey][$langCategory][$key], $this->LOCAL_LANG_charset[$this->altLLkey][$langCategory][$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.
else
$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
if(isset($langCategory) && isset($this->LOCAL_LANG['default'][$langCategory][$key]))
$word = $this->LOCAL_LANG['default'][$langCategory][$key]; // No charset conversion because default is english and thereby ASCII
else
$word = $this->LOCAL_LANG['default'][$key]; // No charset conversion because default is english and thereby ASCII
} else {
$word = $this->LLtestPrefixAlt.$alt;
}
......
}
// NO extension of class - does not make sense here.
?>
?>
(1-1/6)