Feature #17567
closedClean old locallang management for Typo3 v 4.2
0%
Description
For now, a locallang array is supposed to be in multiple charsets (one charset per lang) and is translated each time the label is requested. Of course it is very difficult to have a locallang.php in many charsets...
So xml locallang files were created, in only one charset. But locallang arrays are still expected to be in multiple Charsets ! So XML Locallang is converted to the expected charset, and on each usage of these labels, re-converted from this expected charset to the renderCharset (or the backend charset)
I think we can (or maybe we must ?) get rid of this old comportement, and save performances, memory, etd...
The idea is :
1) a php locallang file can declare its charset (as xml file does)
2) locallang arrays (from php file or xml file) will be converted into the renderCharset (maybe only the requested language, as in readLLXMLfile ?)
3) No other charset conversion is done in other functions (pi_getLL, getLL, getLLL, sL, ...)
Attached patch files are a way to make this work.
Please note that this system works : my pp_lib extensions (and all those wich depends on) uses it since some monthes and there's no known bugs.
(issue imported from #M6233)
Files
Updated by Popy no-lastname-given about 17 years ago
Note that this patch list is not complete. The $LANG class should be patched too, and maybe a few other classes.
By the way, there's no compatibility problems with this system.
Updated by Ingo Renner almost 17 years ago
locallang.php files are depricated, use the xml files, only please.
please also check whether this issue is fixed by these changes:
http://bugs.typo3.org/view.php?id=2731
http://core.typo3.org/v4/changeset/3064
http://core.typo3.org/v4/changeset/3065
http://core.typo3.org/v4/changeset/3066
http://core.typo3.org/v4/changeset/3130
Updated by Martin Kutschker over 16 years ago
The general idea outlined in the bug report has been implemented for 4.2. t3lib_div always returns (and also caches) the labels in $TSFE->renderCharset (FE) or $LANG->charSet (BE).
Not implemented has been the charset variable for locallang.php. I don't think it's needed. If you don't want a multi-charset file use locallang.xml and utf-8.