简体   繁体   English

您如何翻译TYPO3 CMS 8.7 LTS中的EXT:Form按钮?

[英]How do you translate EXT:Form Buttons in TYPO3 CMS 8.7 LTS?

with the topic How do you translate EXT:Form forms in TYPO3 CMS 8.7 LTS? 您如何在TYPO3 CMS 8.7 LTS中翻译EXT:Form表单? i got my translations almost complete. 我的翻译差不多完成了。 Can anyone help me to also translate the prevous and next buttons in the forms? 有人可以帮我翻译一下表格中的上一个和下一个按钮吗?

fe FE

renderables:
  -
    renderingOptions:
      previousButtonLabel: ''
      nextButtonLabel: ''
    identifier: page-1
    label: ''
    type: Page

You can use the following translation keys to translate buttons in EXT:form. 您可以使用以下翻译键来翻译EXT:form中的按钮。

element.Form.renderingOptions.submitButtonLabel
element.Page.renderingOptions.previousButtonLabel
element.Page.renderingOptions.nextButtonLabel
element.SummaryPage.renderingOptions.previousButtonLabel
element.SummaryPage.renderingOptions.nextButtonLabel

These allow to localize button labels globally for all forms equally. 这允许同样全球本地化按钮标签的所有形式。


You can set translated custom labels for specific forms, too. 您也可以为特定表格设置翻译后的自定义标签。 Please mind the special position of the form-identifier inside the translation key only for the submit button (seems a bug): 请注意,表单标识符在翻译键内的特殊位置仅适用于提交按钮(似乎有错误):

element.<form-identifier>.renderingOptions.submitButtonLabel

To translate previous and next buttons for specific forms, you can use the element-identifiers. 要转换特定形式的上一个下一个按钮,可以使用元素标识符。 You can also combine these with a form-identifier. 您也可以将它们与表单标识符结合使用。

Form definition (excerpt): 表格定义(节选):

renderables:
  -
    renderingOptions:
      previousButtonLabel: 'Previous step'
      nextButtonLabel: 'Next step'
    identifier: summarypage-1
    label: 'Summary page'
    type: SummaryPage

Translation keys: 翻译键:

<form-identifier>.element.<element-identifier>.renderingOptions.nextButtonLabel
element.<element-identifier>.renderingOptions.nextButtonLabel
<form-identifier>.element.<element-identifier>.renderingOptions.previousButtonLabel
element.<element-identifier>.renderingOptions.previousButtonLabel

Example keys for the form definition above: 上面的表单定义的示例键:

MyContactForm.element.summarypage-1.renderingOptions.previousButtonLabel
element.summarypage-1.renderingOptions.previousButtonLabel

Limitation: You can not translate previous and next buttons when combining the form-identifier and the general element-type (like 'SummaryPage'). 限制:当组合使用form-identifier和常规element-type (如“ SummaryPage”)时, 无法转换上一个下一个按钮。

The following won't work: 以下内容不起作用:

<form-identifier>.element.SummaryPage.renderingOptions.nextButtonLabel

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM