function language_menu

Implements hook_menu().

File

drupal/core/modules/language/language.module, line 61
Add language handling functionality to Drupal.

Code

function language_menu() {

  // Base language management and configuration.
  $items['admin/config/regional/language'] = array(
    'title' => 'Languages',
    'description' => 'Configure languages for content and the user interface.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_admin_overview_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language.admin.inc',
    'weight' => -10,
  );
  $items['admin/config/regional/language/list'] = array(
    'title' => 'List',
    'weight' => 0,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/regional/language/add'] = array(
    'title' => 'Add language',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_admin_add_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'weight' => 5,
    'type' => MENU_LOCAL_ACTION,
    'file' => 'language.admin.inc',
  );
  $items['admin/config/regional/language/edit/%language'] = array(
    'title' => 'Edit language',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_admin_edit_form',
      5,
    ),
    'access callback' => 'language_access_language_edit_or_delete',
    'access arguments' => array(
      5,
    ),
    'file' => 'language.admin.inc',
  );
  $items['admin/config/regional/language/delete/%language'] = array(
    'title' => 'Confirm delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_admin_delete_form',
      5,
    ),
    'access callback' => 'language_access_language_edit_or_delete',
    'access arguments' => array(
      5,
    ),
    'file' => 'language.admin.inc',
  );

  // Language negotiation.
  $items['admin/config/regional/language/detection'] = array(
    'title' => 'Detection and selection',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_negotiation_configure_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'weight' => 10,
    'file' => 'language.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/regional/language/detection/url'] = array(
    'title' => 'URL language detection configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_negotiation_configure_url_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/config/regional/language/detection/session'] = array(
    'title' => 'Session language detection configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_negotiation_configure_session_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/config/regional/language/detection/browser'] = array(
    'title' => 'Browser language detection configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_negotiation_configure_browser_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/config/regional/language/detection/browser/delete/%'] = array(
    'title' => 'Delete language mapping',
    'page arguments' => array(
      'language_negotiation_configure_browser_delete_form',
      7,
    ),
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language.admin.inc',
  );
  $items['admin/config/regional/language/detection/selected'] = array(
    'title' => 'Selected language detection configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_negotiation_configure_selected_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  return $items;
}