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

_LOCAL_LANG translations not working #125

Closed MarcelKohler closed 10 months ago

MarcelKohler commented 10 months ago

Hi, I am currently experiencing difficulties with the translation feature for your cookie message. Specifically, it does not seem to be functioning correctly at the moment. My approach was based on the guidelines provided here: https://docs.typo3.org/p/dirkpersky/typo3-dp_cookieconsent/main/en-us/Configuration/Language.html.

For reference, I am using TYPO3 version 12.4.8, t3sbootstrap version 5.3.2, and dp_cookieconsent version 12.1.4. I have also ensured that the t3sbootstrap cookie option is disabled.

Any assistance or guidance would be greatly appreciated.

DirkPersky commented 10 months ago

He,

there is a workaround: https://github.com/DirkPersky/typo3-dp_cookieconsent/issues/116#issuecomment-1775172281

At the moment i dont know exactly why 12LTS dosnt' do it, the basic way.

MarcelKohler commented 10 months ago

Thank you so much! That worked! For future reference (if anyone clicks on this bug), here is my solution:

_extlocalconf.php

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

Then create the Resources/Private/Language/custom.xlf within your own extension and override for example the "message" field like this:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" date="2013-03-09T18:44:59Z" product-name="your_extension">
        <header/>
        <body>
       <trans-unit id="message">
               <source>We use cookies and other tracking technologies to personalize and improve your experience. By continuing to use our website you consent to this.</source>
               <target>Your Cookie Translation</target>
            </trans-unit>
        </body>
    </file>
</xliff>

And don't forget to use "Manage Languages" to download the updated language packs. ;)

MarcelKohler commented 9 months ago

He,

there is a workaround: #116 (comment)

At the moment i dont know exactly why 12LTS dosnt' do it, the basic way.

Funny Story: They finally patched it in 12.4.9 (https://get.typo3.org/release-notes/12.4.9). So no need to use the workaround I posted here earlier... :D