You are here

function language_hierarchy_install in Language Hierarchy 7

Same name and namespace in other branches
  1. 8 language_hierarchy.install \language_hierarchy_install()
  2. 2.x language_hierarchy.install \language_hierarchy_install()

Implements hook_install().

File

./language_hierarchy.install, line 19

Code

function language_hierarchy_install() {
  db_add_field('languages', 'parent', array(
    'type' => 'varchar',
    'length' => 12,
    'not null' => TRUE,
    'default' => '',
    'description' => 'Code of parent language.',
  ));
  drupal_static_reset('language_list');

  // Ensure that language_hierarchy_language_init() runs before
  // i18n_variable_language_init().
  db_query("UPDATE {system} SET weight = -901 WHERE name = 'language_hierarchy' AND type = 'module'");
}