[TYPO3-dev] Proper usage of lang::getLL()?

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Jul 16 23:43:53 CEST 2009


Francois Suter schrieb:
> Hi,
> 
>> What about extensions that rely on the second parameter?
>>
>> I am against such patches. If the feature exists, leave it. We should
>> add features, not remove them...
> 
> Sorry I was not clear enough. I don't want to remove the second
> parameter of lang::getLL(). I just want to remove the usage of it that
> was made in recent patches about localization. In these patches a lot of
> calls to getLL() were made with the second parameter set to "true". This
> means that all localized strings would go through htmlspecialchars(),
> which I find not only unnecessary, but actually undesirable, as there
> are localized string containing HTML tags and this will waste them.
> 
> Actually (on second check) in these patches all localized strings are
> passed through htmlspecialchars() unless they already had existing HTML
> tags inside them. I find this rather constraining as it means that tags
> cannot be added later without also changing the core code to remove the
> "true" flag.
> 
> And as I mentioned before, this really doesn't seem to be a common
> practice in the core as I couldn't find calls using the "true" flag.

I don't think one will want to add some html-tag inside an existing
localized string which wasn't there before. After all it is about
translation and not "changing" the output.

If one needs to extend one particular localization string to include
html-tags, a different LL-tag has to be made anyway and processed in PHP
code anyway.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list