You are here

function i18n_taxonomy_install in Internationalization 7

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

File

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

Code

function i18n_taxonomy_install() {
  module_load_install('i18n');
  i18n_install_create_fields('taxonomy_vocabulary', array(
    'language',
    'i18n_mode',
  ), TRUE);
  i18n_install_create_fields('taxonomy_term_data', array(
    'language',
    'i18n_tsid',
  ));

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

  // Set vocabulary mode if updating from D6, module changed name
  if (variable_get('i18n_drupal6_update')) {
    i18n_taxonomy_update_7000();
  }
}