1

Is there a way to fully translate the contact message forms in Drupal 8? In the content language screen, the contact message bundle is marked as translation is not supported.

Edit: To clarify, I would like to translate the fields of the form. As some answers note, the fields can be translated via the regular field translation, but I am running into an issue whereby translations are replaced by the English version when the cache is cleared. By going to /admin/config/regional/content-language and saving the form, the translations are back.

(Note that the default language on the site is not English.)

  • Do you want to translate the labels? Those are fields, so you can do that using config translation for the configurable fields and interface translation for the default ones (subject, message, ..) – Berdir Nov 28 '15 at 8:56
2

I think, content in contact messages is the user input. Then you cannot translate this, because it is not saved to the database. The form itself is config translation, similar to the field definitions in content types.

2

Leaving a full answer here for post-release Drupal searchers.

The message "translation is not supported" refers to the content of the fields. The content in this case is not stored, ergo, cannot be translated - unlike, for example any node title or image description.

To translate content like field contents, the required modules are languages & content translation. In your case, you want to actually translate the field titles. This is classed as configuration translation which requires the module of the same name, and that in turn depends on interface translation. So basically, you'll have all of the core modules enabled to perform this task (as obviously you will be translating content as well, right?)

When you have enabled the required modules, you will need to download the .po translation file from .drupal.org and import them in the area User interface translation > Import. Also you can check for updates to your module interface translations under Reports > Available translation updates.

Translating a contact form's fields then is done automatically (if the language file provided for that). Translating the contact form's configurable items is a matter of visiting Structure > Contact forms and selecting translate on the edit/context menu of the form required, whereby you can translate the auto-reply etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.