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

Christian Kuhn lolli at schwarzbu.ch
Tue Sep 1 00:36:32 CEST 2009


* Committed to trunk rev. 5860 (without the newline hunk in latest
revision).


* Added pending documentation to wiki for doc_core_inside and doc_l10nguide


Thanks @all for feedback and lightning-speed reviews.
Hope you all enjoy this feature
Christian


Christian Kuhn wrote:
> 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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
> 
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/ 
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core



More information about the TYPO3-team-core mailing list