Index: typo3/sysext/cms/tslib/class.tslib_pibase.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pibase.php (Revision 8568) +++ typo3/sysext/cms/tslib/class.tslib_pibase.php (Arbeitskopie) @@ -992,11 +992,15 @@ foreach ($confLL as $k => $lA) { if (is_array($lA)) { $k = substr($k,0,-1); + // For labels coming from the TypoScript (database) the charset is assumed to be "forceCharset" and if that is not set, assumed to be that of the individual system languages + $locallangCharset = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : $GLOBALS['TSFE']->csConvObj->charSetArray[$k]; foreach($lA as $llK => $llV) { if (!is_array($llV)) { $this->LOCAL_LANG[$k][$llK] = $llV; - // For labels coming from the TypoScript (database) the charset is assumed to be "forceCharset" and if that is not set, assumed to be that of the individual system languages - $this->LOCAL_LANG_charset[$k][$llK] = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : $GLOBALS['TSFE']->csConvObj->charSetArray[$k]; + $this->LOCAL_LANG_charset[$k][$llK] = $locallangCharset; + } else { + // call recursive helper function to support dots in locallang labels + $this->getSupportForDotsInLocallangLabels($k, $llK, $llV, $locallangCharset); } } } @@ -1006,7 +1010,30 @@ $this->LOCAL_LANG_loaded = 1; } + /** + * Gets a key and an array and merges the given key with all keys from the array. + * Calls itself recursive, if array value is an array. + * Sets $this->LOCAL_LANG[$language][$labelKeyMerged] if value is not an array + * + * @param string The language key + * @param string The actual key from the _LOCAL_LANG.[$language] array + * @param array The value array from given key + * @param string The charset for the given language + * @return void + */ + function getSupportForDotsInLocallangLabels($language, $labelKeyPrefix, array $labelArray, $locallangCharset) { + foreach ($labelArray as $labelKey => $labelValue) { + $labelKeyMerged = $labelKeyPrefix . $labelKey; + if (is_array($labelValue)) { + // call this function recursive + $this->getSupportForDotsInLocallangLabels($language, $labelKeyMerged, $labelValue, $locallangCharset); + } else { + $this->LOCAL_LANG[$language][$labelKeyMerged] = $labelValue; + $this->LOCAL_LANG_charset[$language][$labelKeyMerged] = $locallangCharset; + } + } + }