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.
$entity: The entity for which to return the language.
$entity_type: The entity type; e.g., 'node' or 'user'.
The language code for the language of the entity.
function callback_entity_info_language($entity, $entity_type) {
return $entity->language;
}