You are here

function i18n_taxonomy_menu_alter in Internationalization 7

Implements hook_menu_alter().

Take over the taxonomy pages

File

i18n_taxonomy/i18n_taxonomy.module, line 136
i18n taxonomy module

Code

function i18n_taxonomy_menu_alter(&$items) {

  // If ctool's page manager is active for the path skip this modules override.
  // Also views module takes over this page so this won't work if views enabled.
  // Skip when taxonomy_display enabled, see http://drupal.org/node/1280194
  if (variable_get('page_manager_term_view_disabled', TRUE) && !module_exists('taxonomy_display')) {

    // Taxonomy term page. Localize terms.
    $items['taxonomy/term/%taxonomy_term']['page callback'] = 'i18n_taxonomy_term_page';
    $items['taxonomy/term/%taxonomy_term']['title callback'] = 'i18n_taxonomy_term_name';
    $items['taxonomy/term/%taxonomy_term']['file'] = 'i18n_taxonomy.pages.inc';
    $items['taxonomy/term/%taxonomy_term']['file path'] = drupal_get_path('module', 'i18n_taxonomy');
  }

  // Localize autocomplete
  $items['taxonomy/autocomplete']['page callback'] = 'i18n_taxonomy_autocomplete_field';
  $items['taxonomy/autocomplete']['file'] = 'i18n_taxonomy.pages.inc';
  $items['taxonomy/autocomplete']['file path'] = drupal_get_path('module', 'i18n_taxonomy');
}