Bug #27971

xliff removed hook to override locallangs

Added by Georg Ringer about 4 years ago. Updated almost 4 years ago.

Status:Rejected Start date:2011-07-08
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:Backend API Spent time: -
Target version:4.6.0
TYPO3 Version:4.6 Is Regression:
PHP Version:5.3 Sprint Focus:
Complexity:

Description

There was a hook in t3lib_div::readLLFile() to override any locallang file by another one. The additional locallang is merged with the existing one which is very nice feature to override just one label.

as the l10n changed a lot with xliff, it is not just a copy paste to get hook working again.
previous hook was this

$overrides = array();
            $fileRefWithoutExtension = preg_replace('/\.(php|xml)$/', '', $fileRef);

            if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.php'])) {
                $overrides = array_merge($overrides, $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.php']);
            }
            if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.xml'])) {
                $overrides = array_merge($overrides, $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.xml']);
            }

            if (count($overrides) > 0) {
                foreach ($overrides as $overrideFile) {
                    $languageOverrideFileName = self::getFileAbsFileName($overrideFile);
                    if (@is_file($languageOverrideFileName)) {
                        $languageOverrideArray = self::readLLXMLfile($languageOverrideFileName, $langKey, $charset);
                        $LOCAL_LANG = self::array_merge_recursive_overrule($LOCAL_LANG, $languageOverrideArray);
                    }
                }
            }

Related issues

duplicates Core - Bug #27923: locallangXMLOverride hook has been removed Closed 2011-07-06

History

#1 Updated by Susanne Moog almost 4 years ago

Georg is this a duplicate of #27923?

#2 Updated by Christian Kuhn almost 4 years ago

  • Status changed from Accepted to Needs Feedback

#3 Updated by Christian Kuhn almost 4 years ago

This was solved afaik, and the unit test that was created for the hook in the first place runs as well again.

#4 Updated by Steffen Gebert almost 4 years ago

  • Status changed from Needs Feedback to Closed

Fixed with #27923

#5 Updated by Steffen Gebert almost 4 years ago

  • Status changed from Closed to Needs Feedback

Well, let's wait for Georg's statement :)

#6 Updated by Steffen Gebert almost 4 years ago

  • Status changed from Needs Feedback to Rejected

Closed due to no feedback

Also available in: Atom PDF