Feature: #97637 - Translate default value of form elements 

See forge#97637

Description 

The TYPO3 Form Framework now supports translating the defaultValue property of form elements via XLF translation files.

Previously, only properties like label, placeholder and rendering options could be translated through the form framework's translation mechanism. The defaultValue property was always rendered as-is from the form definition, regardless of the current frontend language.

With this change, the defaultValue is translated before rendering using the same XLF key conventions already established for other form element properties. The translation is resolved in the following order (first match wins):

  1. <form-definition-identifier>.element.<element-identifier>.properties.defaultValue
  2. element.<element-identifier>.properties.defaultValue
  3. element.<element-type>.properties.defaultValue

Example 

Given a form element defined as:

fileadmin/form_definitions/contact.form.yaml
identifier: contact-form
type: Form
prototypeName: standard
renderables:
  - type: Page
    identifier: page-1
    renderables:
      - type: Text
        identifier: bestDish
        label: 'Best dish?'
        defaultValue: 'Hamburger'
        renderingOptions:
          translation:
            translationFiles:
              - 'EXT:my_extension/Resources/Private/Language/Form/locallang.xlf'
Copied!

The translation file can now provide a translated default value:

EXT:my_extension/Resources/Private/Language/Form/de.locallang.xlf
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
    <file source-language="en" target-language="de" datatype="plaintext" original="messages">
        <body>
            <trans-unit id="contact-form.element.bestDish.properties.defaultValue">
                <source>Hamburger</source>
                <target>Kartoffel</target>
            </trans-unit>
        </body>
    </file>
</xliff>
Copied!

Or, to apply the translation to all Text elements across all forms:

EXT:my_extension/Resources/Private/Language/Form/de.locallang.xlf
<trans-unit id="element.Text.properties.defaultValue">
  <source>Hamburger</source>
  <target>Kartoffel</target>
</trans-unit>
Copied!

Impact 

Form integrators can now provide language-specific default values for form elements. The translation is applied automatically before rendering using the existing translation file configuration in renderingOptions.translation.translationFiles.

Array-based defaultValue properties are intentionally excluded from translation. These occur on multi-value elements like MultiCheckbox or MultiSelect, where the values are option keys that must match the configured properties.options exactly. Translating them would break the value-to-option mapping. The option labels themselves can be translated via the existing properties.options.[*] translation mechanism.