Commit 2bc5334a authored by Dries's avatar Dries

- Patch #642010 by yoroy: shorten and reorganize help text for language stuff.

parent 54fc6e99
......@@ -712,14 +712,13 @@ function locale_language_providers_url_form() {
$form = array();
$form['locale_language_negotiation_url_part'] = array(
'#title' => t('URL language indicator'),
'#title' => t('The part of the URL that will determine the 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('Select which part of the URL will determine the language.'),
);
$form['#redirect'] = 'admin/config/regional/language/configure';
......@@ -737,7 +736,7 @@ function locale_language_providers_session_form() {
'#title' => t('Request/session parameter'),
'#type' => 'textfield',
'#default_value' => variable_get('locale_language_negotiation_session_param', 'language'),
'#description' => t('This value will be the name of the request/session parameter which will be used to determine the desired language.'),
'#description' => t('Name of the request/session parameter used to determine the desired language.'),
);
$form['#redirect'] = 'admin/config/regional/language/configure';
......
......@@ -60,10 +60,13 @@ function locale_help($path, $arg) {
case 'admin/config/regional/language/add':
return '<p>' . t('Add all languages to be supported by your site. If your desired language is not available in the <em>Language name</em> drop-down, click <em>Custom language</em> and provide a language code and other details manually. When providing a language code manually, be sure to enter a standardized language code, since this code may be used by browsers to determine an appropriate display language.') . '</p>';
case 'admin/config/regional/language/configure':
$output = '<p>' . t("Language negotiation settings determine the site's content and presentation languages. For both <em>language types</em> there is a list of <em>language detection methods</em> which can be used to configure the desired language negotiation logic. Each detection method can be <em>dragged</em> to gain a higher priority, but it must be <em>enabled</em> to affect the language negotiation process. If a language detection method is applied then all the lower ones are <em>ignored</em>, otherwise the following one will be taken into account. Some lanaguage detection methods provide a configuration page to further specify their behavior. The <em>default</em> detection method is always applied, so anything below it is always ignored. <strong>Modifying this setting may break all incoming URLs and should be used with caution in a production environment.</strong>") . '</p>';
$output .= '<p>' . t('Available options include:') .'</p>';
$output .= '<ul><li>' . t('<strong>URL.</strong> The language is determined by examining the URL for a language code, a custom string, or a domain, that matches the ones (if any) specified for each language. The path prefix or domain name for a language may be set by editing the <a href="@languages">available languages</a>. In the absence of an appropriate match, the site is displayed in the <a href="@languages">default language</a>. A configuration is available to choose whether use the path prefix or the domain. <em>Example: "example.com/de/contact" sets language to German based on the use of "de" within the path. "http://de.example.com/contact" sets presentation language to German based on the use of "http://de.example.com" in the domain.</em>', array('@languages' => url('admin/config/regional/language'))) . '</li>';
$output .= '<li>' . t('<strong>Session.</strong> The language is determined from a request/session parameter. A configuration is available to choose the URL parameter name to be used. <em>Example: "example.com?language=de" sets language to German based on the use of "de" within the "language" parameter.</em>') . '</li></ul>';
$output = '<p>' . t("Determine which languages to use for content and for the administrative interface. Drag the detection methods into the order they should test for languages. The first method that gets a result will set the language for the relevant part of the site. <strong>Changing these settings may break all incoming URLs, use with caution in a production environment.</strong>") . '</p>';
return $output;
case 'admin/config/regional/language/configure/url':
$output = '<p>' . t('Determine the language by examining the URL. Example: "example.com/de/contact" sets language to German based on the use of "de" as the path prefix. "http://de.example.com/contact" sets presentation language to German based on the use of "http://de.example.com" in the domain.') . '</p>';
return $output;
case 'admin/config/regional/language/configure/session':
$output = '<p>' . t('Determine the language from a request/session parameter. Example: "example.com?language=de" sets language to German based on the use of "de" within the "language" parameter.') . '</p>';
return $output;
case 'admin/config/regional/translate':
$output = '<p>' . t('This page provides an overview of available translatable strings. Drupal displays translatable strings in text groups; modules may define additional text groups containing other translatable strings. Because text groups provide a method of grouping related strings, they are often used to focus translation efforts on specific areas of the Drupal interface.') . '</p>';
......@@ -521,7 +524,7 @@ function locale_language_negotiation_info() {
'file' => $file,
'weight' => -8,
'name' => t('URL'),
'description' => t('The language is determined from the URL (Path prefix or domain).'),
'description' => t('Determine the language from the URL (Path prefix or domain).'),
'config' => 'admin/config/regional/language/configure/url',
);
......@@ -543,7 +546,7 @@ function locale_language_negotiation_info() {
'file' => $file,
'weight' => -4,
'name' => t('User'),
'description' => t('The language is determined from the language preference set in the user account.'),
'description' => t("Show in this user's language preference."),
);
$providers[LOCALE_LANGUAGE_NEGOTIATION_BROWSER] = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment