I have a nested field collection where the fields inside the field collection need to be translated. Structure:

field_collection header:
— Header (textfield)
— field_collection specs:
——— Name (textfield)
——— Value (textfield)

I have tried multiple configurations for the fields but I don’t seem to get it to work nicely with entity translation.

According to the readme one must enable the entity translation settings for the field collections, disable translations on the field collection fields, and enable the translation on the fields inside the field collection (in my case the textfields).

Full readme part that is relevant:

  • Field collection items must be selected as a translatable entity type at Admin -> Config -> Regional -> Entity Translation.

  • The common use case is to leave the field collection field untranslatable and set the necessary fields inside it to translatable. There is currently a known issue where a host can not be translated unless it has at least one other field that is translatable, even if some fields inside one of its field collections are translatable.

  • The alternate use case is to make the field collection field in the host translatable. If this is done it does not matter whether the inner fields are set to translatable or not, they will all be translatable as every language for the host will have a completely separate copy of the field collection item(s).

When saving an item the header field saves fine for all languages, but the second field collection doesn’t seem to play nice and only save the values multiple times in one language.

I have the feeling it's a configuration issue with the field collections/entity translation/field collection settings. But I can't seem to find the sweet spot where it works as expected.

Your Answer

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

Browse other questions tagged or ask your own question.