[TYPO3-english] Localized labels from a custom extension

Sergio Catalá scatala.enet at gmail.com
Thu Nov 12 16:35:21 CET 2015


Hi,

We have the situation that one extension is making some custom
configuration for powermail (let's say "custom_powermail"), and we have
some problem with localization for labels. We would like to overwrite some
labels in the .xlf files inside our "custom_powermail" extension, but the
labels from "powermail" are always used. To solve this problem, we had to
extend some classes that make this internatiolization, and do something
like that:

$additionalAttributes['data-parsley-required-message'] =
LocalizationUtility::translate(
    'validationerror_mandatory',
    'custom_powermail',
    array($field->getTitle())
);

(note the second parameter)

which we think it's not a very clean solution. We have to take care of new
changes on that function when updating "powermail".
We read the article about overwritting labels through TypoScript (
https://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/GoodToKnow/ChangingLabels/Index.html),
but it doesn't work for validation.

Any hint how to solve this problem?

Is there a way to say to extbase that labels from a custom extension have
higher priority than the one it extends?

Thanks in advance,
Sergio


More information about the TYPO3-english mailing list