Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 8972) +++ t3lib/class.t3lib_div.php (revision ) @@ -4672,8 +4672,20 @@ } $fileNotFound = TRUE; } - if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRef])) { - foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRef] as $overrideFile) { + + + $overrides = array(); + $filenameWithoutExtension = preg_replace('/\.(php|xml)$/', '', $fileRef); + + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$filenameWithoutExtension . '.php'])) { + $overrides = array_merge($overrides, $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$filenameWithoutExtension . '.php']); + } + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$filenameWithoutExtension . '.xml'])) { + $overrides = array_merge($overrides, $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$filenameWithoutExtension . '.xml']); + } + + if (count($overrides) > 0) { + foreach ($overrides as $overrideFile) { $languageOverrideFileName = self::getFileAbsFileName($overrideFile); if (@is_file($languageOverrideFileName)) { $languageOverrideArray = self::readLLXMLfile($languageOverrideFileName, $langKey, $charset);