Feature #20777
closed
tslib_pibase - function pi_loadLL - _LOCAL_LANG Keys like listView.more should also be possible in Typoscript
Added by Sonja Schubert about 15 years ago.
Updated almost 6 years ago.
Description
A lot of extensions works with points in their locallang.xml files like listView.more.
At the moment its not possible to overwrite these locallang labels via Typoscript because the point will be interpreted as new subarray.
It would be great if the function, which loads the locallang Typoscript labels, could be changed as shown in the attached diff patch.
The patch changes the function pi_loadLL in the class.tslib_pibase so only in the subarray of _LOCAL_LANG its possible to have keys like listView.more.
Of course its possible to overwrite these function in every of my own extensions but it would be nice if it would works for tt_news and all other big extensions out of the box.
(issue imported from #M11571)
Files
Overwriting selectors with labels becomes impossible using TypoScript:
plugin.tx_extname_pi1._LOCAL_LANG.es {
tx_ext_business_unit.I.1 = One
tx_ext_business_unit.I.2 = Two
tx_ext_business_unit.I.3 = Three
tx_ext_business_unit.I.4 = Four
}
System still displays values from locallang.xml.
As the selector fields are standard TYPO3 feature (you can easily add them using kickstarter) there should be support for overwriting theirs lables via TypoScript.
Wrong way around:
The kickstarter builds LangKey Index with dots in the keys... this is pretty bad, but not a blocker.
Simply don't use them and you're done.
This is WAY easier than fiddling around with subarrays and stuff.
So the whole report is based on the fact that TS does use a dot as array delimiter.
This is IMHO perfectly fine.
I uploaded two new diff files which contain a new version of the bug fix. The function to get the flatten array is now located in t3lib_div:: where it belong into. I also sent the new patches to the core list.
Thank you for your feedback Mathes but I think this feature is needed to make it possible to use all the hundreds of old extensions which used the kickstarter and use points in their locallang. And it doesn't break anything.
For new extensions I agress the kickstarter shouldn't use points.
I tested the patches and they work for me.
Thanks a lot!
Dumping my comment from the core mailing list:
I just had another idea in mind, that isn't that bad for performance and doesn't use TypoScript inconsistently.
A setup for overwriting language keys with dots might look like that:
tx_myestension._LOCAL_LANG.de.keys-with-dots {
10 = my.key.with.dots|My label
20 = another.key.with.dots|My other label
}
I also attached a patch for tslib_pibase that can interpret this kind of setup. No flattening of arrays needed.
What do you think of it?
- Description updated (diff)
- Status changed from New to Needs Feedback
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.9)?
Since dots in TypoScript can be escaped with backslashes this issue should be solved.
Code like this currently works:
plugin.tx_testext._LOCAL_LANG.default.mylabel\.withdot = new label
- Status changed from Needs Feedback to Resolved
Works with the escaped dots in newer versions then.
- Status changed from Resolved to Closed
Also available in: Atom
PDF