0

I have a site with field collections and the entity_translation module that saves field collections after the following format:

When I save a new translation via the edit page, Drupal adds a new parent field collection row in field_data_field_parent_fc (en, en-gb, en-au). Each parent field collection points to a different text field (en -> 100, en-gb -> 101, en-au -> 102, etc.)

This is want I want to happen. There should be one row in field_data_field_parent_fc, containing language und, which points to a single text field (100). Then in the text field table, there should be a translation for en, en-gb, and en-au.

What I want is something akin to entity translation as opposed to node translation. Is there a setting for this, within the entity_translation module or otherwise?

1 Answer 1

0

It turned out that while I had field collections enabled in /admin/config/regional/entity_translation, the language must be set to "Language neutral" for field collections. This creates a single "und" row, and the child text fields can have their own entries for language.

Also, make sure the "Field Translation" setting is disabled for field collections under /admin/structure/types/manage/{your_content_type}/fields/{your field collection field}. This way, the field collections won't be translated, but the underlying text fields will be.

1
  • What versions of core, field_collection and entity_translation are you using? I have the exact configuration describe in your answer but viewing the node does not work correctly (although the edit forms work fine). Because field_myfc is not a translated field it gets loaded as 'und', causing all child fields to "lose" the correct language that the node is being displayed as
    – Ward D.S.
    Commented Feb 17, 2019 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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