Search code examples
formstypo3translation

Typo3 - Adding translation for new form input doesn't work


I had to add a new input to an excisting form in typo3 V.10.4.31. Then I tried to translate the placeholder. The input is displayed in the form but the placeholder isn't translated.

Here is the formfield:

defaultValue: ''
            type: Text
            identifier: country
            label: 'Land / Country'
            properties:
              fluidAdditionalAttributes:
                placeholder: Land

The locallang.xlf:

<trans-unit id="element.country.properties.placeholder">
      <source>Country</source>
</trans-unit>

And the de.locallang.xlf:

<trans-unit id="element.country.properties.placeholder">
            <source>Country</source>
            <target>Land</target>
</trans-unit>

I'm new in typo3 and I wonder if I missed something. The other formfields are translated correctly so I thought I only have add the translation in the existing files. I copied the code of an other field and only changed the identifier and the text.


Solution

  • looks 100% to me, I think you have a caching problem, try to clear the cache in 'maintenance' (if your TYPO3 is above V9) ... I think your xlf file needs to load