Feature #20955
closedOverride FE labels with XML files
0%
Description
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 can easily registered with a language override extension. But they have problems exporting labels to the _LOCAL_LANG TS format.
Example on how to test:
- 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.
Notes:
As this solution handles FE and BE exactly the same way, we might could deprecate $TYPO3_CONF_VARS['BE']['XLLfile'] in a follow-up RFC.
(issue imported from #M11825)
Files
Updated by Steffen Gebert about 14 years ago
Hint: The feature has later been overworked to not use $TYPO3_CONF_VARS['SYS']['XLLfile'], but to react to $TYPO3_CONF_VARS['SYS']['locallangXMLOverride'] (see also #23697 for an example).