You are here

function locale_language_providers_url_form in Drupal 7

The URL language provider configuration form.

Related topics

1 string reference to 'locale_language_providers_url_form'
locale_menu in modules/locale/locale.module
Implements hook_menu().

File

modules/locale/locale.admin.inc, line 707
Administration functions for locale.module.

Code

function locale_language_providers_url_form($form, &$form_state) {
  $form['locale_language_negotiation_url_part'] = array(
    '#title' => t('Part of the URL that determines language'),
    '#type' => 'radios',
    '#options' => array(
      LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX => t('Path prefix'),
      LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN => t('Domain'),
    ),
    '#default_value' => variable_get('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX),
    '#description' => t('<em>Path prefix</em>: URLs like http://example.com/de/contact set language to German (de). <em>Domain</em>: URLs like http://de.example.com/contact set the language to German. <strong>Warning: Changing this setting may break incoming URLs. Use with caution on a production site.</strong>'),
  );
  $form_state['redirect'] = 'admin/config/regional/language/configure';
  return system_settings_form($form);
}