I'm using entity translations and EntityFieldQuery to load nodes, I would like to add a restriction to load only nodes that have a translation for a specific language, say load all nodes that have been translated to spanish?

What query can do that?

I'm loading like this at the moment, without any language restrictions:

     $query = new EntityFieldQuery();
      $query->entityCondition('entity_type', 'node')
        ->entityCondition('bundle', $type)
        ->propertyCondition('status', 1)
        ->range($offset, $limit);
      $results = $query->execute();

Comments

darrylmabini’s picture

Try this translation_node_get_translations()

supermoos’s picture

That doesn't seem to work with the entity_translation module?