Issue Bug Closed

#46525locallangXMLOverride not working with all expected paths

Francois Suter 03/22/13, 08:38 updated 11/10/21, 22:52

Description

The locallangXMLOverride makes it possible to override any translation in TYPO3. Having worked on real case, I found out that it worked only if the localization file was located inside an extension.

The following works:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr']['EXT:lang/locallang_general.xlf'][] = 'EXT:custom_config/Resources/Private/Language/fr.locallang_general_override.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr']['EXT:lang/locallang_general.xlf'][] = PATH_typo3conf . 'custom_config/Resources/Private/Language/fr.locallang_general_override.xlf';

but that doesn’t:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr']['EXT:lang/locallang_general.xlf'][] = 'fileadmin/custom/fr.locallang_general_override.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr']['EXT:lang/locallang_general.xlf'][] = PATH_typo3conf . 'l10n/custom/fr.locallang_general_override.xlf';

I couldn’t track where this goes wrong. The l10n code is somewhat convoluted, calling itself recursively (with flags to prevent that), so I gave up after a while.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.