Problem/Motivation
A webform stores all its elements as one YAML string (elements, schema type: text). Locale can only translate this string as a whole. Individual texts – titles, placeholders, options, button labels – never reach the translation database, so community or recipe translations cannot be applied.
Drupal CMS site templates ship webforms (Haven, Byte, Convivial Gov, Summit, Provus EDU, Pulse, CareSphere, Convene). On a site installed in German their forms stay English ("Your email address", "Tell us more...", "Send"), although everything else is translated. Webform's own per-element translation only helps if someone creates the translation manually in the UI.
Steps to reproduce
- Install Drupal CMS in German with the CareSphere site template.
- Open the contact page: all field labels, placeholders, options and the submit button are English.
Proposed resolution
Expose element texts to locale, e.g.
- a config schema per translatable element property (like Webform's own translation manager already knows), so locale can translate #title, #placeholder, #options labels, #submit__label etc. individually, or
- a locale integration that translates element texts from the string database when a webform is created from config.
Remaining tasks
Discuss the approach.
Additional information
Workaround in dcle (WebformElementsTranslator): translates the element texts one by one and writes the YAML back; option keys are kept.
Comments