i18n_forum.install 584 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * @file
  4. * Multilingual forum install file.
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function i18n_forum_install() {
  10. // Set module weight for it to run after core modules and i18n_taxonomy.
  11. db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18n_forum' AND type = 'module'");
  12. // Make forum vocabulary translatable.
  13. if (($vid = variable_get('forum_nav_vocabulary', 0)) && !i18n_taxonomy_vocabulary_mode($vid)) {
  14. $vocabulary = taxonomy_vocabulary_load($vid);
  15. $vocabulary->i18n_mode = I18N_MODE_LOCALIZE;
  16. taxonomy_vocabulary_save($vocabulary);
  17. }
  18. }