英文:
Typo3 - Adding translation for new form input doesn't work
问题
I had to add a new input to an existing 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 to add the translation in the existing files. I copied the code of another field and only changed the identifier and the text.
英文:
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.
答案1
得分: 0
看起来对我来说是100%,我认为你有一个缓存问题,请尝试在“维护”中清除缓存(如果你的TYPO3版本在V9以上)...我认为你的xlf文件需要加载。
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论