#109341Allow form labels to be translated via "LLL:" prefixed keys
Description
The form framework already offers a possibility to define translations for a form and its labels and options: https://docs.typo3.org/permalink/typo3-cms-form:concepts-frontendrendering-translation-formdefinition
This already brings some flexibility and allows to set a label by element identifier (e.g. “myfield”) or element type (e.g. “Text”) and it’s even possible to override labels only for specific forms by using the form definition identifier:
<formDefinitionIdentifier>.element.<elementIdentifier>.properties.<propertyName>element.<formElementIdentifier>.properties.<propertyName>element.<elementType>.properties.<propertyName>
But I there is one thing, I miss:
It would be awesome to be able to define locallang labels directly in the form definition. There might be cases, when several fields in the same form needs the same label. An example might be the addresses for shipping and for billing. Both of them need fields like “Postal code” and “City”. With the actual behavior, I would need to have redundant entries in my translation file for shippingStreet and billingStreet.
If it would be allowed to directly set LLL:EXT:my_extension/Resources/Private/Language/form.xlf as form labels in my form definition, I could avoid redundant entries in the translation files.
Example:
# street as part of the shipping address
-
defaultValue: ''
type: Text
identifier: shippingStreet
label: 'LLL:EXT:my_extension/Resources/Private/Language/form.xlf:street'
properties:
fluidAdditionalAttributes:
required: required
autocomplete: address-line1
validators:
-
identifier: NotEmpty
# street as part of the billing address
-
defaultValue: ''
type: Text
identifier: billingStreet
label: 'LLL:EXT:my_extension/Resources/Private/Language/form.xlf:street'
properties:
fluidAdditionalAttributes:
required: required
autocomplete: address-line1
validators:
-
identifier: NotEmptyReviews 1
History 15
-
Gerrit Code Review pushed patch set 1 for main to change 93344 status
NewUnder Review <span data-processor="relativetime" data-value="2026-03-25T08:34:54+00:00" > 03/25/26, 08:34 </span> -
Gerrit Code Review pushed patch set 2 for main to change 93344 <span data-processor="relativetime" data-value="2026-03-25T09:45:48+00:00" > 03/25/26, 09:45 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 93344 <span data-processor="relativetime" data-value="2026-04-02T14:47:22+00:00" > 04/02/26, 14:47 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 93344 <span data-processor="relativetime" data-value="2026-04-02T15:02:28+00:00" > 04/02/26, 15:02 </span>
Hi @whnsnn ,
would be great if you can enhance this feature with the new translation domain-based syntax, e.g. my_extension.form:street