You are here

function l10n_client_settings_form in Localization client 7

Same name and namespace in other branches
  1. 6.2 l10n_client.admin.inc \l10n_client_settings_form()
  2. 6 l10n_client.module \l10n_client_settings_form()

Settings form for l10n_client.

Enable users to set up a central server to share translations with.

1 string reference to 'l10n_client_settings_form'
l10n_client_menu in ./l10n_client.module
Implement hook_menu().

File

./l10n_client.admin.inc, line 13
Administrative page callbacks for the Localization client module.

Code

function l10n_client_settings_form() {
  $form = array();
  $form['l10n_client_disabled_paths'] = array(
    '#title' => t('Disable on-page translation on the following system paths'),
    '#type' => 'textarea',
    '#description' => t('One per line. Wildcard-enabled. Examples: system/ajax, admin*'),
    '#default_value' => variable_get('l10n_client_disabled_paths', ''),
  );
  $form['l10n_client_use_server'] = array(
    '#title' => t('Enable sharing translations with server'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('l10n_client_use_server', FALSE),
  );
  $form['l10n_client_server'] = array(
    '#title' => t('Address of localization server to use'),
    '#type' => 'textfield',
    '#description' => t('Each translation submission will also be submitted to this server. We suggest you enter <a href="@localize">https://localize.drupal.org/</a> to share with the greater Drupal community. Make sure you set up an API-key in the user account settings for each user that will participate in the translations.', array(
      '@localize' => 'https://localize.drupal.org/',
    )),
    '#default_value' => variable_get('l10n_client_server', 'https://localize.drupal.org/'),
  );
  return system_settings_form($form);
}