Issue Feature Under Review Orphaned

#109341Allow form labels to be translated via "LLL:" prefixed keys

Albrecht Köhnlein 03/24/26, 11:35 updated 04/02/26, 15:02

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: NotEmpty

Reviews 1

History 15

  1. Josua Vogel commented <span data-processor="relativetime" data-value="2026-03-25T12:28:07+00:00" > 03/25/26, 12:28 </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