array( 'entity_translation' => array( 'class' => 'EntityTranslationCustomEntityHandler', 'base path' => 'custom_entity/%custom_entity', 'access callback' => 'custom_entity_tab_access', 'access arguments' => array(1), 'edit form' => 'custom_entity_form_state_key', 'bundle callback' => 'custom_entity_translation_enabled_bundle', 'default settings' => array( 'default_language' => LANGUAGE_NONE, 'hide_language_selector' => FALSE, ), ), ), ); // Entity type which has multiple (e.g. bundle-specific) paths. $info['custom_entity_2'] = array( 'translation' => array( 'entity_translation' => array( 'class' => 'EntityTranslationCustomEntityHandler', 'path sets' => array( 'default' => array( 'base path' => 'custom_entity_2/%custom_entity', 'path wildcard' => '%custom_entity', ), 'fancy' => array( // Base path is not required. 'edit path' => 'fancy/%entity/edit', 'path wildcard' => '%entity', ), ), ) ) ); return $info; } /** * Allows modules to act when a new translation is added. * * @param $entity_type * The entity type. * @param $entity * The entity. * @param $translation * The inserted translation array. * @param $values * The translated set of values, if any. */ function hook_entity_translation_insert($entity_type, $entity, $translation, $values = array()) { } /** * Allows modules to act when a translation is updated. * * @param $entity_type * The entity type. * @param $entity * The entity. * @param $translation * The updated translation array. * @param $values * The translated set of values, if any. */ function hook_entity_translation_update($entity_type, $entity, $translation, $values = array()) { } /** * Allows modules to act when a translation is deleted. * * @param $entity_type * The entity type. * @param $entity * The entity. * @param $langcode * The langcode of the translation which was deleted. */ function hook_entity_translation_delete($entity_type, $entity, $langcode) { }