[TYPO3-core] RFC #12244: Improve locallangXMLOverride feature

Christian Kuhn lolli at schwarzbu.ch
Sun Nov 1 15:09:31 CET 2009


Hi.

Steffen Gebert wrote:
>> Problem:
>> #11825 introduced a new way to override LL-XML files.
>> Unfortunately it's as unflexible as the old XLLfile style, which was only
>> usable for BE.
>> With both, it's only possible to register one (1) file, which overrides
>> another.
>>
>> Solution
>> Let's improve this new feature to let a LL file be overridden by several
>> files (e.g. by several extensions and user-defined labels) by looping
>> over
>> the array.
> 
> After Benni liked my idea and supposed to move it from
> $T3CV[EXT][locallangXMLOverride] to $T3CV[SYS][XLLfile], here's an
> updated patch.
> 
> How to test:
> * Install the attached langtest2 extension.
>   It renames the logout button and the title of the shortcuts menu
> * Place the LLoverride.xml file in typo3conf/
> * Add the following lines to typo3conf/extTables.php
>  
> $TYPO3_CONF_VARS['SYS']['XLLfile']['EXT:lang/locallang_core.php']['extTables.php']
> = 'typo3conf/LLoverride.xml';
>  
> $TYPO3_CONF_VARS['SYS']['XLLfile']['EXT:lang/locallang_core.xml']['extTables.php']
> = 'typo3conf/LLoverride.xml';


CMIIW: Registration in extTables.php won't work for FE labels?!


+1 on reading.

Some remarks, though:
- Naming: If we deprecate [BE][XLLfile] anyway, we could go for a better
name, thats why [locallangXMLOverride] was chosen.
- Naming: I personally don't care if we use [SYS] or [EXT], any arguments?
- Using an array: This will implement the exact same problem we have
with hooks: If several extensions register overrides to the same file,
the order is given by the load order in ['extList']. This is no critism,
but generally poor design in this area. Or consider this case: You want
to override a label file from an extension, but your extension is loaded
before the ext you want to override -> nothing happens. Who did not
waste some time with those problems before?


Cheers
Christian


More information about the TYPO3-team-core mailing list