You are here

function entity_translation_install in Entity Translation 7

Implements hook_install().

File

./entity_translation.install, line 161
Installation functions for Entity Translation module.

Code

function entity_translation_install() {

  // entity_translation_form_alter() needs to run after locale_form_alter() and
  // translation_menu(); entity_translation_menu_alter() needs to run after
  // i18n_node_menu_alter().
  db_update('system')
    ->fields(array(
    'weight' => 11,
  ))
    ->condition('name', 'entity_translation')
    ->execute();

  // Enable translation for nodes.
  variable_set('entity_translation_entity_types', array(
    'node' => 'node',
  ));

  // Make translation use the content language type.
  variable_set('translation_language_type', LANGUAGE_TYPE_CONTENT);

  // Enable revision support for entity translation.
  variable_set('entity_translation_revision_enabled', TRUE);

  // Enable taxonomy autocomplete support.
  variable_set('entity_translation_taxonomy_autocomplete', TRUE);
}