Reputation: 3498
I'm using the form extension and that's a part of my yaml file:
-
renderingOptions:
previousButtonLabel: 'Go Back'
nextButtonLabel: 'Send Message'
type: SummaryPage
identifier: summarypage-1
label: Summary
In the xlf file I can access the buttons like this:
<trans-unit id="BasicContactForm.element.page-1.renderingOptions.nextButtonLabel" xml:space="preserve">
<source>Send Message</source>
</trans-unit>
<trans-unit id="BasicContactForm.element.summarypage-1.renderingOptions.previousButtonLabel" xml:space="preserve">
<source>Go Back</source>
</trans-unit>
<trans-unit id="element.BasicContactForm.renderingOptions.submitButtonLabel" xml:space="preserve">
<source>Send Message</source>
</trans-unit>
But how can I access the label (header) of my summary page? This does not seem to work:
<trans-unit id="element.BasicContactForm.summarypage-1.label" xml:space="preserve">
<source>Summary1</source>
</trans-unit>
Neither this:
<trans-unit id="BasicContactForm.element.summarypage-1.label" xml:space="preserve">
<source>Summary1</source>
</trans-unit>
Upvotes: 1
Views: 586
Reputation: 1375
You can translate the labels for (summary) pages the same way as you translate the form field labels.
In your case, the following translations keys are possible:
<!-- All elements of type 'SummaryPage' -->
<trans-unit id="element.SummaryPage.properties.label">
<source>Summary</source>
</trans-unit>
<!-- All elements with the identifier 'summarypage-1' -->
<trans-unit id="element.summarypage-1.properties.label">
<source>Summary</source>
</trans-unit>
<!-- The single element with the identifier 'summarypage-1' inside the form 'BasicContactForm' -->
<trans-unit id="BasicContactForm.element.summarypage-1.properties.label">
<source>Summary</source>
</trans-unit>
I wrote a comprehensive tutorial on TYPO3 form translation with many explanations and examples which you can find here: https://www.sebkln.de/en/tutorials/detail/translating-forms-in-the-typo3-form-framework/
Upvotes: 3