You are here

function l10n_client_menu in Localization client 5

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

Implementation of hook_menu().

File

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

Code

function l10n_client_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $access = user_access('use on-page translation');
    $items[] = array(
      'path' => 'locale',
      'title' => t('Translate interface'),
      'callback' => 'l10n_client_translate_page',
      'access' => $access,
    );
    $items[] = array(
      'path' => 'locale/untranslated',
      'title' => t('Untranslated'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'locale/translated',
      'title' => t('Translated'),
      'type' => MENU_LOCAL_TASK,
    );

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