How would I use EntityFieldQuery->fieldCondition() or similar to filter by field language? E.g. give me all nodes where field_description has items in English, or in LANGUAGE_NONE?

There is a $language_group parameter, but I think this won't do the job..

Background: I would like to improve entity_translation module for D7, see https://www.drupal.org/project/entity_translation/issues/2852983#comment-13039403

  • It seems ->entityCondition('language', 'en', '=') filters by the first field table in the query, which depending on the order might be exactly the one we want. But this only applies in sql storage, no guarantee that other storage engines behave the same. It seems more coincidental than intentional. – donquixote Mar 25 '19 at 23:24

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.