[TYPO3-core] RFC: #11825: Override FE labels with XML files

Christian Kuhn lolli at schwarzbu.ch
Sun Aug 30 18:30:34 CEST 2009


This is SVN patch request.

Type: feature

Branches: trunk

BT reference: http://bugs.typo3.org/view.php?id=11825

Problem:
It's currently impossible to override FE labels with own labels defined
in XML files. The only way to override labels in FE is via TS
"_LOCAL_LANG", while overriding labels in BE is already possible with
XML files ($TYPO3_CONF_VARS['BE']['XLLfile'])

Solution:
Add a new global $TYPO3_CONF_VARS['XLL'] to register XML overrides for
FE _and_ BE labels and handle registered files in t3lib_div::readLLfile
. FE TS _LOCAL_LANG overrides still takes precedence of registered XML
files.


Background:
Translation agencies often have no problems exporting language overrides
in a well-formed XML file, that coulde be easily registered with a
language override extension. But they have problems exporting labels to
the _LOCAL_LANG TS format.


Example on how to test:
- Apply patch
- Add a felogin content element to your page
- You will see the label "Enter your username and password here in order
to log in on the website:" in FE
- Install attached "langtest" extension, it will register a FE pi1 and a
BE locallang file to $TYPO3_CONF_VARS['XLL']
- Your FE label will now switch to "LANG DEFAULT XML OVERRIDE", another
registered BE override will switch the second tab of the BE content
element to "LANG DEFAULT XML OVERRIDE Redirect Options"
- Override the FE label via TS, eg:
plugin.tx_felogin_pi1 {
    _LOCAL_LANG {
        default.ll_welcome_message = LANG DEFAULT TS OVERRIDE
    }
}
- Play with different languages and overrides, the test extension shows
some examples in ext_localconf.php


Note:
As this solution handles FE and BE exactly the same way, we could
deprecate $TYPO3_CONF_VARS['BE']['XLLfile'] in a follow-up RFC.


Regards
Christian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11825_v1.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090830/e7b7ea95/attachment.txt 


More information about the TYPO3-team-core mailing list