Experimental project

This is a sandbox project, which contains experimental code for developer use only.

The Alternate Localization Server is a module that enables use of a localization server other than localize.drupal.org.

The l10n_update README.txt says in part:

Each project i.e. modules, themes, etc. can define alternative translation servers to retrieve the translation updates from. Include the following definition in the projects .info file:

l10n server = example.com
l10n url = http://example.com/files/translations/l10n_server.xml

The download path pattern is normally defined in the above defined xml file.

You may override this path by adding a third definition in the .info file:

l10n path = http://example.com/files/translations/%core/%project/%project-%release.%language.po

The Alternate Localization Server module operates on the premise that we want all modules to go to another localization server for translation updates. So we use hook_system_info_alter to update those settings as specified above. More specifically, we set 110n server and l10n path. The latter overrides l10n url, so we don't need to bother with an l10n_server.xml file.

When the module is deactivated, we reset these to defaults, using hook_disable().

NOTE: Make sure that .po files are not forbidden in .htaccess files! If .po files are forbidden, this solution will not work. For reference, see: http://drupal.org/node/1011532

Requirements

  • Localization Update, which automatically updates translations.
  • Localization Client, which provides an on-page editor for translating strings, but also provides a field to identify a localization server to use.

Related Projects

Localization Server, which gives the ability to manage multiple translation projects. It is used on localize.drupal.org.

Project information

  • Created by inkling on , updated