Project

General

Profile

Actions

Feature #17567

closed

Clean old locallang management for Typo3 v 4.2

Added by Popy no-lastname-given about 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2007-08-29
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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

t3lib_div.diff (1.99 KB) t3lib_div.diff Administrator Admin, 2007-08-29 11:10
tslib_fe.diff (3.42 KB) tslib_fe.diff Administrator Admin, 2007-08-29 11:11
tslib_pibase.diff (1.94 KB) tslib_pibase.diff Administrator Admin, 2007-08-29 11:11
Actions #1

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.

Actions #2

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

Actions #3

Updated by Ingo Renner over 16 years ago

Masi, did we fix this?

Actions #4

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.

Actions

Also available in: Atom PDF