[development] Drupal 5 installation language files

Gabor Hojtsy gabor at hojtsy.hu
Sat Nov 18 16:22:02 UTC 2006

On Sat, 18 Nov 2006, [ISO-8859-1] Konstantin Käfer wrote:
> * "This is Drupal installation. Please select a language do continue"

This already works as you know for sure.

> * If the user selects a language other than english, one of the following 
> will happen:
>  * If the required files are already in place (e.g. localized releases, like 
> drupal-5.0-de.tar.gz), they are used to continue
>  * Otherwise, the required files (both installer translation and the whole 
> language file) are downloaded from the distribution's Project home (e.g. 
> drupal.org)
> * Installation continues in the selected language
> * If a language other than english is selected, locale.module is activated 
> and the translation imported and set as default

The locale module is already enabled if you install Drupal 5.0 using a 
non-English interface. The only missing piece is translation import for 
the actual Drupal interface. The proposal you have above is faulty in 
several points (for example there is no ungzip functionality in Drupal 
built in, and there will be no such feature in the foreseeable feature 

Module translation imports should be done around the same lines as module 
database table creations go. Why import aggregator module translations if 
I am not going to use it? Now we don't have the tables, but will still 
have the translations imported. So the first point to look into is putting 
the PO files into the module folders per module (as the info, install and 
other files are there). If you install (turn on) a module and have locale 
module turned on, you should get all the language files imported for that 
particular module for all enables languages automatically without further 
interaction. This should work first from the file system with per-module 
PO files.

It is possible to package the PO files so that they have the modules 
folder structure, so if you unzip them into the Drupal folder, the PO 
files fall into their proper place (including the installer 
translation file). Since PO files are generated per source file (with 
common strings aggregated into general.po), it is possible to move the 
PO files to the folder where they belong in the source.

It is also possible to write a module to automatically import the initial 
PO files for the modules you have in your install profile, so that you can 
start working with Drupal in the exact language you used to set up the 
system. It is possible to extend this module to watch when a module is 
enabled to import the module translations from the database.

> That's definitely not for 5.0, though.

The above was the grand plan for 5.0. Fortunately given how possible it is 
to bend Drupal, it is doable to experiment with the above as an install 
profile or contrib module. It is also possible to ship translations as 
install profiles (without Drupal core files), so you can dump them onto 
Drupal, and enjoy fully localized install and usage.

Just someone needs to find the time, step up and code all this. I would 
say go for locale file based imports first, since unless it is done, there 
is no point in dreaming about remote file download and translation import 
on the fly.


More information about the development mailing list