Search code examples
typo3fluid

typo3 frontend translation in fluid viewhelper


I have copied the content of an extension to some private space (below fileadmin), as I always do with most extension where I want to set some changes.

In one viewhelper I have now added the line:

<f:format.raw><f:translate id="EmailSignature"/></f:format.raw>

In the directory fileadmin/.../Resources/Private/Language/ there are files like locallang.xlf and de.locallang.xlf

In general, for this extension, templateRootPath, partialRootPath and layoutRootPath are set and work since some partials I already changed are used.

locallang.xlf now has the entry:

            <trans-unit id="EmailSignature" resname="EmailSignature">
                <source>my signature</source>
            </trans-unit>

and de.locallang.xlf now has the entry:

            <trans-unit id="EmailSignature" resname="EmailSignature">
                <source></source>
                <target>meine Signatur<br>Betreiber:<br></target>
            </trans-unit>

But the content of this translation is not shown on the webpage.

If I add the lines to the original logallang.xlf and de.locallang.xlf of the extension (just for testing purposes) - it works.

What do I have to set more to enable the changed language files?

Regards Kallewirsch


Solution

  • For overriding language labels TYPO3 has the _LOCAL_LANG-property in TypoScript: TSref: Top-level objects / plugin

    plugin.tx_myext_pi1._LOCAL_LANG.de.EmailSignature = meine Signatur<br>Betreiber:<br>