DirkPersky / typo3-dp_cookieconsent

TYPO3 Extension: Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)
GNU Affero General Public License v3.0
32 stars 27 forks source link

Can't translate labels in TYPO3 12 #116

Closed timdreier closed 1 year ago

timdreier commented 1 year ago

Hi, In TYPO3, I can't translate the labels as documented. Doing the following still displays the default text:

plugin.tx_dp_cookieconsent {
    _LOCAL_LANG {
        de {
            message = Some german text which are displayed properly
        }
    }
}
gf-luka commented 1 year ago

I do have the same problem overwriting the labels as described by @timdreier . Tested it with several plugin keys plugin.tx_dp_cookieconsent plugin.tx_dpcookieconsent plugin.dp_cookieconsent etc.

I can not even overwrite the whole language files via locallangXMLOverride.

Any idea?

DirkPersky commented 1 year ago

He,

if i try it this way in TYPO 11 LTS

plugin.tx_dp_cookieconsent._LOCAL_LANG.de {
  allowall = Alle zulassen
  message = TEXT
}

Than it works: image

DirkPersky commented 1 year ago

But yeah in TYPO12 it didn't work anymore.

kurtzaugg commented 1 year ago

And how could it be realized nowadays?

I cannot translate with overriding the XLF as well. Is that because the plugin folder is not located in typo3_conf/ext?

DirkPersky commented 1 year ago

No, u need to change the date in den XLF and than run the languagepack update. image

You also coud use the XLF overwrite:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']
    ['EXT:dp_cookieconsent/Resources/Private/Language/locallang.xlf'][]
        = 'EXT:..YOURPATH...../custom.xlf';

https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Localization/ManagingTranslations.html#custom-translations

kurtzaugg commented 1 year ago

Thanks, it works now.