You are here

function locale_help in Drupal 4

Same name and namespace in other branches
  1. 8 core/modules/locale/locale.module \locale_help()
  2. 5 modules/locale/locale.module \locale_help()
  3. 6 modules/locale/locale.module \locale_help()
  4. 7 modules/locale/locale.module \locale_help()
  5. 9 core/modules/locale/locale.module \locale_help()

Implementation of hook_help().

File

modules/locale.module, line 18
Enables administrators to manage the site interface languages.

Code

function locale_help($section) {
  switch ($section) {
    case 'admin/help#locale':
      $output = '<p>' . t('The locale module allows you to present your Drupal site in a language other than the default English. You can use it to set up a multi-lingual web site or replace given <em>built-in</em> text with text which has been customized for your site. Whenever the locale module encounters text which needs to be displayed, it tries to translate it into the currently selected language. If a translation is not available, then the string is remembered, so you can look up untranslated strings easily.') . '</p>';
      $output .= '<p>' . t('The locale module provides two options for providing translations. The first is the integrated web interface, via which you can search for untranslated strings, and specify their translations. An easier and less time-consuming method is to import existing translations for your language.  These translations are available as <em>GNU gettext Portable Object files</em> (<em>.po</em> files for short).  Translations for many languages are available for download from the translation page.') . '</p>';
      $output .= '<p>' . t('If an existing translation does not meet your needs, the <em>.po</em> files are easily edited with special editing tools. The locale module\'s import feature allows you to add strings from such files into your site\'s database. The export functionality enables you to share your translations with others, generating Portable Object files from your site strings.') . '</p>';
      $output .= t('<p>You can</p>
<ul>
<li>administer localization at <a href="%admin-locale">administer &gt;&gt; localization</a>.</li>
<li>manage strings for the localization: <a href="%admin-locale-string-search">administer &gt;&gt; localization &gt;&gt; manage strings</a>.</li>
<li>add a locale language: <a href="%admin-locale-language-add">administer &gt;&gt; localization &gt;&gt; add language</a>.</li>
<li>download translation files from the <a href="%external-http-drupal-org-project-Translations">Drupal translations page</a>.
</li>
</ul>
', array(
        '%admin-locale' => url('admin/locale'),
        '%admin-locale-string-search' => url('admin/locale/string/search'),
        '%admin-locale-language-add' => url('admin/locale/language/add'),
        '%external-http-drupal-org-project-Translations' => 'http://drupal.org/project/Translations',
      ));
      $output .= '<p>' . t('For more information please read the configuration and customization handbook <a href="%locale">Locale page</a>.', array(
        '%locale' => 'http://drupal.org/handbook/modules/locale/',
      )) . '</p>';
      return $output;
    case 'admin/modules#description':
      return t('Enables the translation of the user interface to languages other than English.');
    case 'admin/locale':
    case 'admin/locale/language/overview':
      return t("<p>Drupal provides support for the translation of its interface text into different languages.  This page provides an overview of the installed languages. You can add a language on the <a href=\"%add-language\">add language page</a>, or directly by <a href=\"%import\">importing a translation</a>. If multiple languages are enabled, registered users will be able to set their preferred language.  The site default will be used for anonymous visitors and for users without their own settings.</p><p>Drupal interface translations may be added or extended by several courses: by <a href=\"%import\">importing</a> an existing translation, by <a href=\"%search\">translating everything</a> from scratch, or by a combination of these approaches.</p>", array(
        "%search" => url("admin/locale/string/search"),
        "%import" => url("admin/locale/language/import"),
        "%add-language" => url("admin/locale/language/add"),
      ));
    case 'admin/locale/language/add':
      return t("<p>You need to add all languages in which you would like to display the site interface. If you can't find the desired language in the quick-add dropdown, then you will need to provide the proper language code yourself. The language code may be used to negotiate with browsers and to present flags, etc., so it is important to pick a code that is standardised for the desired language. You can also add a language by <a href=\"%import\">importing a translation</a>.</p>", array(
        "%import" => url("admin/locale/language/import"),
      ));
    case 'admin/locale/language/import':
      return t("<p>This page allows you to import a translation provided in the gettext Portable Object (.po) format.  The easiest way to get your site translated is to obtain an existing Drupal translation and to import it.  You can find existing translations on the <a href=\"%url\">Drupal translation page</a>. Note that importing a translation file might take a while.</p>", array(
        '%url' => 'http://drupal.org/project/translations',
      ));
    case 'admin/locale/language/export':
      return t("<p>This page allows you to export Drupal strings. The first option is to export a translation so it can be shared.  The second option generates a translation template, which contains all Drupal strings, but without their translations. You can use this template to start a new translation using various software packages designed for this task.</p>");
    case 'admin/locale/string/search':
      return t("<p>It is often convenient to get the strings from your setup on the <a href=\"%export\">export page</a>, and use a desktop Gettext translation editor to edit the translations.  On this page you can search in the translated and untranslated strings, and the default English texts provided by Drupal.</p>", array(
        "%export" => url("admin/locale/language/export"),
      ));
  }
}