Commit 18a68728 authored by webchick's avatar webchick

#882164 by aschiwi, Gábor Hojtsy, David_Rothstein, reglogge, et al: Fix the...

#882164 by aschiwi, Gábor Hojtsy, David_Rothstein, reglogge, et al: Fix the 'install from another language' instructions so that they actually work.
parent 936344ea
......@@ -72,12 +72,24 @@ INSTALLATION
mv drupal-x.x/* drupal-x.x/.htaccess /var/www/html
If you would like to have the default English interface translated to a
different language, we have good news. You can install and use Drupal in
other languages from the start. Check whether a released package of the
language desired is available for this Drupal version at
http://drupal.org/project/translations and download the package. Extract
the contents to the same directory where you extracted Drupal into.
By default, Drupal is installed in English, and further languages may be
installed later. Follow these steps to translate Drupal into your language
during installation:
- Download a translation file for this Drupal version from the translation
server:
http://localize.drupal.org/download
- Rename the downloaded file to your language's ISO code (e.g., de.po or
fr.po) and place it into the directory /translations right below
the installation profile's directory that you want to use for your
installation (usually "standard"):
/profiles/standard/translations/
- Reload the language selection page after adding translations.
For detailed instructions, visit http://drupal.org/localize.
2. IF NECESSARY, CREATE THE CONFIGURATION FILE AND GRANT WRITE PERMISSIONS
......
......@@ -1198,21 +1198,28 @@ function install_select_locale(&$install_state) {
}
if (empty($install_state['parameters']['locale'])) {
// If only the built-in (English) language is available, and we are using
// the default profile and performing an interactive installation, inform
// the user that the installer can be localized. Otherwise we assume the
// user knows what he is doing.
// If only the built-in (English) language is available, and we are
// performing an interactive installation, inform the user that the
// installer can be localized. Otherwise we assume the user knows what he
// is doing.
if (count($locales) == 1) {
if ($profilename == 'standard' && $install_state['interactive']) {
if ($install_state['interactive']) {
drupal_set_title(st('Choose language'));
if (!empty($install_state['parameters']['localize'])) {
$output = '<p>' . st('With the addition of an appropriate translation package, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') . '</p>';
$output .= '<ul><li>' . st('Determine if <a href="@translations" target="_blank">a translation of this Drupal version</a> is available in your language of choice. A translation is provided via a translation package; each translation package enables the display of a specific version of Drupal in a specific language. Not all languages are available for every version of Drupal.', array('@translations' => 'http://drupal.org/project/translations')) . '</li>';
$output .= '<li>' . st('If an alternative translation package of your choice is available, download and extract its contents to your Drupal root directory.') . '</li>';
$output .= '<li>' . st('Return to choose language using the second link below and select your desired language from the displayed list. Reloading the page allows the list to automatically adjust to the presence of new translation packages.') . '</li>';
$output .= '</ul><p>' . st('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.') . '</p>';
$output .= '<p>' . st('How should the installation continue?') . '</p>';
$output .= '<ul><li><a href="install.php?profile=' . $profilename . '&amp;locale=en">' . st('Continue installation in English') . '</a></li><li><a href="install.php?profile=' . $profilename . '">' . st('Return to choose a language') . '</a></li></ul>';
$output = '<p>Follow these steps to translate Drupal into your language:</p>';
$output .= '<ol>';
$output .= '<li>Download a translation from the <a href="http://localize.drupal.org/download" target="_blank">translation server</a>.</li>';
$output .= '<li>Rename the downloaded file to your language\'s <a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes" target="_blank">ISO code</a> (e.g., <code>de.po</code> or <code>fr.po</code>) and place it into the following directory:
<pre>
/profiles/' . $profilename . '/translations/
</pre></li>';
$output .= '</ol>';
$output .= '<p>For more information on installing Drupal in different languages, visit the <a href="http://drupal.org/localize" target="_blank">drupal.org handbook page</a>.</p>';
$output .= '<p>How should the installation continue?</p>';
$output .= '<ul>';
$output .= '<li><a href="install.php?profile=' . $profilename . '">Reload the language selection page after adding translations</a></li>';
$output .= '<li><a href="install.php?profile=' . $profilename . '&amp;locale=en">Continue installation in English</a></li>';
$output .= '</ul>';
}
else {
include_once DRUPAL_ROOT . '/includes/form.inc';
......@@ -1221,8 +1228,8 @@ function install_select_locale(&$install_state) {
}
return $output;
}
// One language, but not the default profile or not an interactive
// installation. Assume the user knows what he is doing.
// One language, but not an interactive installation. Assume the user
// knows what he is doing.
$locale = current($locales);
$install_state['parameters']['locale'] = $locale->name;
return;
......@@ -1263,7 +1270,7 @@ function install_select_locale(&$install_state) {
/**
* Form API array definition for language selection.
*/
function install_select_locale_form($form, &$form_state, $locales, $profilename = 'standard') {
function install_select_locale_form($form, &$form_state, $locales, $profilename) {
include_once DRUPAL_ROOT . '/includes/iso.inc';
$languages = _locale_get_predefined_list();
foreach ($locales as $locale) {
......@@ -1280,7 +1287,7 @@ function install_select_locale_form($form, &$form_state, $locales, $profilename
'#parents' => array('locale')
);
}
if ($profilename == 'standard') {
if (count($locales) == 1) {
$form['help'] = array(
'#markup' => '<p><a href="install.php?profile=' . $profilename . '&amp;localize=true">' . st('Learn how to install Drupal in other languages') . '</a></p>',
);
......
// $Id$
This directory should be used to place downloaded translations
for installing Drupal core.
// $Id$
This directory should be used to place downloaded translations
for installing Drupal core.
......@@ -139,6 +139,10 @@ pre,
kbd {
font-size: 1.231em;
}
pre {
margin: 0.5em 0;
white-space: pre-wrap;
}
/**
* Skip link.
......
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