Whereas indicated in the code (includes/entity.inc at line 1257: "Process the four possible entity condition"), only the are supported : id, revision and bundle.
"Language" property, defined in the entity definition ("bundle keys") is not supported.
The main benefit is that entity itself knows the name of it's language column, so it can be done automaticaly.

It should be helpful for example to filter entities like this :


$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node', '=')
     ->entityCondition('bundle', 'hebergement_publique', '=')
     ->entityCondition('language', $language->language, '=');
$nids = $query->execute();

Instead, currently, we have to do like this :


$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node', '=')
     ->entityCondition('bundle', 'hebergement_publique', '=')
     ->propertyCondition('language', $language->language, '=');
$nids = $query->execute();

Comments

Sebastien @Actualys created an issue. See original summary.

sebastien m.’s picture

Status: Active » Needs review
StatusFileSize
new646 bytes

Here is my patch.

Version: 7.39 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.