TYPO3:表格 properties.fluidAdditionalAttributes.placeholder 翻译
TYPO3: Form properties.fluidAdditionalAttributes.placeholder translation
我正在翻译我的 Typo3 页面。
现在我来到了我要翻译的联系表。从 Typo3 Documentation 我发现我需要这样的东西:
contact.element.subject.properties.fluidAdditionalAttributes.placeholder
...作为我的 locallang.xlf 文件中的翻译 ID。我已经通过 TypoeScript 链接了我的 CustomFormSettings.yaml,在那里设置了我的扩展的翻译路径并创建了一个联系表。
我实际上能够翻译例如提交按钮和其他按钮。但是我无法让我的联系表中的占位符得到翻译,它们都回退到联系表中设置的值而不是翻译。
我猜我处理的 fluidAdditionalAttributes 属性 是错误的,但我已经测试了很多其他组合然后上面。
我必须在翻译 ID 中输入的确切行是什么?
这是我的完整联系表:
renderingOptions:
submitButtonLabel: Submit
identifier: contact
label: Contact
type: Form
prototypeName: frameform
finishers:
-
options:
subject: 'Your message: {subject}'
recipientAddress: mail@mail.com
recipientName: 'Recipient Name'
senderAddress: '{email}'
senderName: '{name}'
replyToAddress: ''
carbonCopyAddress: ''
blindCarbonCopyAddress: ''
format: html
attachUploads: true
translation:
language: ''
identifier: EmailToReceiver
-
options:
subject: 'We have received: {subject}'
recipientAddress: '{email}'
recipientName: '{name}'
senderAddress: mail@mail.com
senderName: 'Sender Name'
replyToAddress: ''
carbonCopyAddress: ''
blindCarbonCopyAddress: ''
format: html
attachUploads: true
identifier: EmailToSender
-
options:
pageUid: '7'
additionalParameters: ''
identifier: Redirect
renderables:
-
renderingOptions:
previousButtonLabel: 'Previous step'
nextButtonLabel: 'Next step'
identifier: mainPage
type: Page
renderables:
-
defaultValue: ''
identifier: name
label: Name
type: Text
properties:
fluidAdditionalAttributes:
placeholder: Name
required: required
validators:
-
identifier: NotEmpty
-
defaultValue: ''
identifier: subject
label: Subject
type: Text
properties:
fluidAdditionalAttributes:
placeholder: Subject
required: required
validators:
-
identifier: NotEmpty
-
defaultValue: ''
identifier: email
label: Email
type: Text
properties:
fluidAdditionalAttributes:
placeholder: 'Email address'
required: required
validators:
-
identifier: NotEmpty
-
identifier: EmailAddress
-
defaultValue: ''
identifier: message
label: Message
type: Textarea
properties:
fluidAdditionalAttributes:
placeholder: Message
required: required
minlength: '10'
maxlength: '512'
validators:
-
identifier: NotEmpty
-
options:
minimum: '10'
maximum: '512'
identifier: StringLength
-
renderingOptions:
previousButtonLabel: 'Previous step'
nextButtonLabel: 'Next step'
identifier: summarypage
label: 'Summary page'
type: SummaryPage
您可以像这样在 locallang.xlf 中覆盖占位符:element.<field-identifier>.properties.placeholder
示例:
<trans-unit id="element.firstname.properties.placeholder">
<source>Your first name</source>
<target>Ihr Vorname</target>
</trans-unit>
我正在翻译我的 Typo3 页面。
现在我来到了我要翻译的联系表。从 Typo3 Documentation 我发现我需要这样的东西:
contact.element.subject.properties.fluidAdditionalAttributes.placeholder
...作为我的 locallang.xlf 文件中的翻译 ID。我已经通过 TypoeScript 链接了我的 CustomFormSettings.yaml,在那里设置了我的扩展的翻译路径并创建了一个联系表。
我实际上能够翻译例如提交按钮和其他按钮。但是我无法让我的联系表中的占位符得到翻译,它们都回退到联系表中设置的值而不是翻译。
我猜我处理的 fluidAdditionalAttributes 属性 是错误的,但我已经测试了很多其他组合然后上面。
我必须在翻译 ID 中输入的确切行是什么?
这是我的完整联系表:
renderingOptions:
submitButtonLabel: Submit
identifier: contact
label: Contact
type: Form
prototypeName: frameform
finishers:
-
options:
subject: 'Your message: {subject}'
recipientAddress: mail@mail.com
recipientName: 'Recipient Name'
senderAddress: '{email}'
senderName: '{name}'
replyToAddress: ''
carbonCopyAddress: ''
blindCarbonCopyAddress: ''
format: html
attachUploads: true
translation:
language: ''
identifier: EmailToReceiver
-
options:
subject: 'We have received: {subject}'
recipientAddress: '{email}'
recipientName: '{name}'
senderAddress: mail@mail.com
senderName: 'Sender Name'
replyToAddress: ''
carbonCopyAddress: ''
blindCarbonCopyAddress: ''
format: html
attachUploads: true
identifier: EmailToSender
-
options:
pageUid: '7'
additionalParameters: ''
identifier: Redirect
renderables:
-
renderingOptions:
previousButtonLabel: 'Previous step'
nextButtonLabel: 'Next step'
identifier: mainPage
type: Page
renderables:
-
defaultValue: ''
identifier: name
label: Name
type: Text
properties:
fluidAdditionalAttributes:
placeholder: Name
required: required
validators:
-
identifier: NotEmpty
-
defaultValue: ''
identifier: subject
label: Subject
type: Text
properties:
fluidAdditionalAttributes:
placeholder: Subject
required: required
validators:
-
identifier: NotEmpty
-
defaultValue: ''
identifier: email
label: Email
type: Text
properties:
fluidAdditionalAttributes:
placeholder: 'Email address'
required: required
validators:
-
identifier: NotEmpty
-
identifier: EmailAddress
-
defaultValue: ''
identifier: message
label: Message
type: Textarea
properties:
fluidAdditionalAttributes:
placeholder: Message
required: required
minlength: '10'
maxlength: '512'
validators:
-
identifier: NotEmpty
-
options:
minimum: '10'
maximum: '512'
identifier: StringLength
-
renderingOptions:
previousButtonLabel: 'Previous step'
nextButtonLabel: 'Next step'
identifier: summarypage
label: 'Summary page'
type: SummaryPage
您可以像这样在 locallang.xlf 中覆盖占位符:element.<field-identifier>.properties.placeholder
示例:
<trans-unit id="element.firstname.properties.placeholder">
<source>Your first name</source>
<target>Ihr Vorname</target>
</trans-unit>