Project

General

Profile

Actions

Feature #20777

closed

tslib_pibase - function pi_loadLL - _LOCAL_LANG Keys like listView.more should also be possible in Typoscript

Added by Sonja Schubert over 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-07-23
Due date:
% Done:

0%

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

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

bugreport_11571.diff (1.19 KB) bugreport_11571.diff Administrator Admin, 2009-07-23 09:46
11571_patch_2.diff (925 Bytes) 11571_patch_2.diff Administrator Admin, 2010-08-09 17:13
11571_patch_pibase_2.diff (582 Bytes) 11571_patch_pibase_2.diff Administrator Admin, 2010-08-09 17:13
typo3-20777-dot_in_ll-v3.diff (1.29 KB) typo3-20777-dot_in_ll-v3.diff Alexander Stehlik, 2011-04-28 18:34
Actions #1

Updated by Sonja Schubert almost 15 years ago

pending in core list

Actions #2

Updated by Tomasz Rakowski over 14 years ago

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.

Actions #3

Updated by Mathias Schreiber over 14 years ago

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.

Actions #4

Updated by Sonja Schubert over 14 years ago

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.

Actions #5

Updated by Alexander Stehlik almost 14 years ago

I tested the patches and they work for me.

Thanks a lot!

Actions #6

Updated by Alexander Stehlik over 13 years ago

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?

Actions #7

Updated by Wouter Wolters almost 10 years ago

  • 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)?

Actions #8

Updated by Alexander Stehlik almost 10 years ago

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
Actions #9

Updated by Stefan Neufeind almost 10 years ago

  • Status changed from Needs Feedback to Resolved

Works with the escaped dots in newer versions then.

Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF