Hey @kdambekalns,
tried your tip with the target, but it still doesn’t work.
For better overview here are all configurations I did till now:
neos/Configuration/Settings.yaml:
TYPO3:
TYPO3CR:
contentDimensions:
'language':
label: 'Language'
icon: 'icon-language'
default: 'de'
defaultPreset: 'de'
presets:
'de':
label: 'German (Germany)'
values: ['de']
uriSegment: 'de'
neos/Packages/Sites/MySite.Package/Configuration/Settings.yaml:
TYPO3:
Form:
yamlPersistenceManager:
savePath: 'resource://MySite.Package/Private/Form/'
presets:
myCustom:
title: 'Custom Elements'
parentPreset: 'default'
formElementTypes:
'TYPO3.Form:Base':
renderingOptions:
translationPackage: 'MySite.Package'
'TYPO3.Form:SingleLineText':
renderingOptions:
templatePathPattern: 'resource://MySite.Package/Private/Form/SingleLineText.html'
neos/Packages/Sites/MySite.Package/Private/Translations/de/Main.xlf:
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="TYPO3.Form" source-language="en" datatype="plaintext" target-language="de">
<body>
<trans-unit id="forms.elements.name.placeholder" xml:space="preserve">
<source>Vorname/Nachname</source>
<target xml:lang="de" state="needs-translation">Vorname/Nachname</target>
</trans-unit>
</body>
</file>
</xliff>
Do I also need a file in “MySite.Package/Private/Translations/en/Main.xlf”?
In combination with TYPO3.Form I am using the package Onedrop.AjaxForm could that be the problem that the translation isn’t working?
Thanks for your help so far!
UPDATE:
After checking the newest version of TYPO3.Form on Github I found maybe the reaseon why it’s not working. For example:
Code SingleLineText.html (on my Neos):
<f:layout name="TYPO3.Form:Field" />
<f:section name="field">
<f:form.textfield property="{element.identifier}" id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" placeholder="{element.properties.placeholder}" errorClass="{element.properties.elementErrorClassAttribute}" />
</f:section>
Code SingleLineText.html (on Github):
{namespace form=TYPO3\Form\ViewHelpers}
<f:layout name="TYPO3.Form:Field" />
<f:section name="field">
<f:form.textfield property="{element.identifier}" id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" placeholder="{element -> form:translateElementProperty(property: 'placeholder')}" errorClass="{element.properties.elementErrorClassAttribute}" />
</f:section>
could this be the reason? I tried to change it but then I get en error-message:
The ViewHelper “<form:translateElementProperty>
” could not be resolved. Based on your spelling, the system would load the class “TYPO3\Form\ViewHelpers\TranslateElementPropertyViewHelper”, however this class does not exist.
I have installed Neos 2.2.5, is this version to old?