function callback_entity_info_language
Return the language code of the entity.
Callback for hook_entity_info().
The language callback is meant to be used primarily for temporary alterations of the property value.
Parameters
$entity: The entity for which to return the language.
$entity_type: The entity type; e.g., 'node' or 'user'.
Return value
The language code for the language of the entity.
See also
Related topics
File
-
modules/
system/ system.api.php, line 4936
Code
function callback_entity_info_language($entity, $entity_type) {
return $entity->language;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.