How to set up a localization server
August 2009: A central localization server is being set up at http://localize.drupal.org/, and a few translation groups are already starting to use the server. Therefore, at this time it's probably not worth it to set up a local server, it's better to wait until your language can move to the central server.
While waiting for the central server, several translation communities started local versions. There's a list of current ones at the project page.
Prerequisites:
- Your PHP installation should have the PEAR Archive_Tar package installed (which requires the zlib PHP extension -- to see if the zlib extension is installed on your PHP check the phpinfo page for a "zlib" section). This is required for Tar extraction (in the l10n_localpacks and l10n_drupalorg modules) and Tar generation (in the l10n_community module).
1. Install and activate modules
Install the following modules:
- Translation template extractor
- Localization server
- Optionally, Organic groups and Views. This is mainly useful if you want to use your server for several languages.
Read the README-files of the modules, if present, to see if there are any additional installation instructions.
If you want to use localization sharing with your server, don't forget to activate Localization remote API
Go to admin/build/modules and activate the following modules:
- Locale (core)
- Localization community (part of the Localization server package)
- Localization community for local packages (part of the Localization server package) ("Localization community for drupal.org" is meant for the final, common server and should not be used for local servers.)
- Translation template extractor
- Optionally:
- Views
- Organic groups
- Localization groups (part of the Localization server package)
2. Configure permissions
Go to Administer > Users > Access control (admin/user/access) and set permissions for:
- access localization community: anonymous and authenticated users
- administer localization community: admin roles only
- submit suggestions: authenticated users
- submit translations and approve suggestions: you may want to set this for authenticated users, or only for a trusted translator role
3. Add language files to be translated
Create a directory on your server to hold the projects to be translated.
Go to Administer > Localization server > Local package connector (admin/l10n_server/l10n_localpacks). Under "Local packages directory" add the name of the directory you just created.
Copy the tarball of the Drupal version(s) you want to translate to the directory you just created. (The tarball is the .tar.gz file at http://drupal.org/download.) Do the same for any contributed modules and themes you want to translate.
4. Finishing touches
Remove unwanted languages. (... description to be added ...)
Import current translations. (... description to be added ...) You can choose to import them as approved translations or as suggestions.
Important: If you import the same file twice, you will get suggestions which are identical to the approved translations.
Go to Administer > Site building > Blocks (admin/build/block). Activate the block "Translation help", choose "Configure" and under "Custom visibility settings" choose "Show this block by default, but let individual users hide it". It probably also makes most sense to check "Show block for specific roles: authenticated user"
There's also a "Bookmarked filters" block. It doesn't do anything currently, but it hardly hurts to activate it.
The information at the language landing pages is written for the final, central server. Change it to something which fits your site using the locale module. (See HOWTO: Creating a customized language set to replace Drupal terminology for how.)
Each language has a landing page. If you want to create content to be shown there, you need to create a vocabulary with a term for each language called "l10n-server-[language code]" .
See the project page for information on how to get listed on the local server list.
As with all sites, follow best practices, and remember to take backups regularly.
Read more:
