Skip to content

LFEditor generate a configuration with 'comment' language entry

This issue occurs only when a source xlf file has a language override. Ex:

  • Extension 'site'
  • Ressources/Private/Language with 2 files : locallang.xlf and fr.locallang.xlf
  • In edit mode, edit in 'fr' langage
  • LFEditor will generate this configuration:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:site/Resources/Private/Language/locallang.xlf'][0] = \TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/lfeditor/OverrideFiles/site/Resources/Private/Language/locallang.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['fr']['EXT:site/Resources/Private/Language/locallang.xlf'][0] = \TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/lfeditor/OverrideFiles/site/Resources/Private/Language/fr.locallang.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['comment']['EXT:site/Resources/Private/Language/locallang.xlf'][0] = \TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/lfeditor/OverrideFiles/site/Resources/Private/Language/comment.locallang.xlf';

This is due by a useless merge of two arrays which have no relation:

  • $localLang with is an array of constants/values, organized by lang code
  • $localSubLanguage with is a result of XLF parsing

This merge have to be removed, all constantes have already been store just before :

$localLang[$lang] = $this->resolveTranslationUnitsArrayIntoFlatArray($localSubLanguage);

Edited by Benoit Chenu
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information