You are here

function i18ntaxonomy_install in Internationalization 6

Same name and namespace in other branches
  1. 5.3 contrib/i18ntaxonomy.install \i18ntaxonomy_install()
  2. 5 contrib/i18ntaxonomy.install \i18ntaxonomy_install()
  3. 5.2 contrib/i18ntaxonomy.install \i18ntaxonomy_install()

Set language field in its own table. Do not drop node.language now, just in case. TO-DO: Drop old tables, fields

File

i18ntaxonomy/i18ntaxonomy.install, line 13
Installation file for i18ntaxonomy module.

Code

function i18ntaxonomy_install() {
  $ret = array();
  db_add_field($ret, 'vocabulary', 'language', array(
    'type' => 'varchar',
    'length' => 12,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_field($ret, 'term_data', 'language', array(
    'type' => 'varchar',
    'length' => 12,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_field($ret, 'term_data', 'trid', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  ));

  // Set module weight for it to run after core modules, but before views.
  db_query("UPDATE {system} SET weight = 5 WHERE name = 'i18ntaxonomy' AND type = 'module'");
}