Reputation: 1
we just started using ext:forms in an extbase action fluid template with the viewhelper (with persistenceIdentifier option). In general this works really fine so far. Also the translation for the form elements works fine, so all labels are in german (german is default language - no other languages). The only problem is the Confirmation finisher.
My configuration looks like this:
identifier: Confirmation
options:
message: 'Thank you!'
contentElementUid: ''
And I use the same xlf file as for the other labels. But it always uses the english text from xlf file (so this means the key is spelled correct etc.).
So what can I do, that the finisher also uses the correct frontend language?
Upvotes: 0
Views: 179
Reputation: 1
I had the same problem today.
you can add your specific key in a template file and override it there. Here the translation works.
In your CustomFormSetup.yaml you need to set an extra prototype based on your standard prototype and add a new template path:
eventRegistration:
__inheritances:
10: 'TYPO3.CMS.Form.prototypes.standard'
finishersDefinition:
Confirmation:
options:
templateName: 'Confirmation'
templateRootPaths:
50: 'EXT:YOUR-EXT-KEY/Resources/Private/Templates/Default/Form/Finishers/Confirmation/YOUR-SUB-FOLDER/'
The File needs to be named Confirmation.html
<f:translate key="LLL:EXT:YOUR-EXT-KEY/Resources/Private/Language/Default/locallang.xlf:FORM- KEY.finisher.Confirmation.message"/>
That way you keep your native Confirmation Message Handling but override it for the one that needs to be translated.
Also dont forget to add the prototype type you just created to your yourForm.form.yaml
prototypeName: yourFormPrototype
Upvotes: 0