You are here

function i18n_forum_install in Internationalization 7

Implements hook_install().

File

i18n_forum/i18n_forum.install, line 10
Multilingual forum install file.

Code

function i18n_forum_install() {

  // Set module weight for it to run after core modules and i18n_taxonomy.
  db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18n_forum' AND type = 'module'");

  // Make forum vocabulary translatable.
  if (($vid = variable_get('forum_nav_vocabulary', 0)) && !i18n_taxonomy_vocabulary_mode($vid)) {
    $vocabulary = taxonomy_vocabulary_load($vid);
    $vocabulary->i18n_mode = I18N_MODE_LOCALIZE;
    taxonomy_vocabulary_save($vocabulary);
  }
}