[TYPO3-english] Localized labels from a custom extension

Markus Klein markus.klein at typo3.org
Thu Nov 12 18:40:43 CET 2015


Hi Sergio!

Did you try overriding the whole xlf file?

$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['path/to/originalTranslationFile.xml'][] = 'path/to/otherTranslationFile.xml'

Maybe this helps. If I remember correctly, powermail has some special stuff going on with labels for validation in FE, but I can't remember by heart.

Kind regards
Markus

------------------------------------------------------------
Markus Klein
TYPO3 CMS Active Contributors Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org

> -----Original Message-----
> From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-
> bounces at lists.typo3.org] On Behalf Of Sergio Catalá
> Sent: Thursday, November 12, 2015 4:35 PM
> To: TYPO3 English <typo3-english at lists.typo3.org>
> Subject: [TYPO3-english] Localized labels from a custom extension
> 
> 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
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list