You are here

function l10n_client_menu in Localization client 7

Same name and namespace in other branches
  1. 5 l10n_client.module \l10n_client_menu()
  2. 6.2 l10n_client.module \l10n_client_menu()
  3. 6 l10n_client.module \l10n_client_menu()

Implement hook_menu().

File

./l10n_client.module, line 16
Localization client. Provides on-page translation editing.

Code

function l10n_client_menu() {
  $items = array();

  // AJAX callback path for strings.
  $items['l10n_client/save'] = array(
    'title' => 'Save string',
    'page callback' => 'l10n_client_save_string',
    'access callback' => 'l10n_client_access',
    'type' => MENU_CALLBACK,
  );

  // Helper pages to group all translated/untranslated strings.
  $items['locale'] = array(
    'title' => 'Translate strings',
    'page callback' => 'l10n_client_translate_page',
    'access callback' => 'l10n_client_access',
  );
  $items['locale/untranslated'] = array(
    'title' => 'Untranslated',
    'page arguments' => array(
      'untranslated',
    ),
    'access callback' => 'l10n_client_access',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['locale/translated'] = array(
    'title' => 'Translated',
    'page arguments' => array(
      'translated',
    ),
    'access callback' => 'l10n_client_access',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/config/regional/translate/client'] = array(
    'title' => 'Client',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'l10n_client_settings_form',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'l10n_client.admin.inc',
    'weight' => 40,
  );
  return $items;
}