1 locale.module locale_menu()

Implements hook_menu().

File

core/modules/locale/locale.module, line 19
Add language handling functionality and enables the translation of the user interface to languages other than English.

Code

function locale_menu() {
  // Language negotiation.
  $items['admin/config/regional/language/detection'] = array(
    'title' => 'Detection and selection',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('language_negotiation_configure_form'),
    'access arguments' => array('administer languages'),
    'weight' => 10,
    'file' => 'locale.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/regional/language/detection/url'] = array(
    'title' => 'URL language detection configuration',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('language_negotiation_configure_url_form'),
    'access arguments' => array('administer languages'),
    'file' => 'locale.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/config/regional/language/detection/session'] = array(
    'title' => 'Session language detection configuration',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('language_negotiation_configure_session_form'),
    'access arguments' => array('administer languages'),
    'file' => 'locale.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );

  // Translation functionality.
  $items['admin/config/regional/translate'] = array(
    'title' => 'User interface translation',
    'description' => 'Translate the built-in user interface.',
    'page callback' => 'locale_translate_seek_screen',
    'access arguments' => array('translate interface'),
    'file' => 'locale.pages.inc',
    'weight' => -5,
  );
  $items['admin/config/regional/translate/translate'] = array(
    'title' => 'Translate',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/regional/translate/import'] = array(
    'title' => 'Import',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('locale_translate_import_form'),
    'access arguments' => array('translate interface'),
    'weight' => 20,
    'type' => MENU_LOCAL_TASK,
    'file' => 'locale.bulk.inc',
  );
  $items['admin/config/regional/translate/export'] = array(
    'title' => 'Export',
    'page callback' => 'locale_translate_export_screen', // possibly multiple forms concatenated
    'access arguments' => array('translate interface'),
    'weight' => 30,
    'type' => MENU_LOCAL_TASK,
    'file' => 'locale.bulk.inc',
  );
  $items['admin/config/regional/translate/edit/%'] = array(
    'title' => 'Edit string',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('locale_translate_edit_form', 5),
    'access arguments' => array('translate interface'),
    'file' => 'locale.pages.inc',
  );
  $items['admin/config/regional/translate/delete/%'] = array(
    'title' => 'Delete string',
    'page callback' => 'locale_translate_delete_page',
    'page arguments' => array(5),
    'access arguments' => array('translate interface'),
    'file' => 'locale.pages.inc',
  );

  // Localize date formats.
  $items['admin/config/regional/date-time/formats/%system_date_format/localize'] = array(
    'title' => 'Localize',
    'description' => 'Configure date formats for each locale',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('locale_date_format_form', 5),
    'access arguments' => array('administer site configuration'),
    'load arguments' => array(FALSE),
    'type' => MENU_LOCAL_TASK,
    'weight' => -8,
    'file' => 'locale.admin.inc',
  );

  return $items;
}