Translation of contributed modules
Translatable strings from contributed modules are not included in the Drupal core translation template files. Module authors can use the potx-cli.php script (or the potx.module) which can be obtained from the Translation template extractor project, to generate a POT file on their own. Instructions for running the extractor can be found in the README.txt that comes with the project. The generated POT file should be named as the module, but with a .pot extension, e.g. event.module gets an event-module.pot file. This file should be placed in a subdirectory translations. Translations should be added to the same directory. E.g. the translations subdirectory of event.module currently contains the following files: de.po, es.po, event-module.pot, he.po, hu.po.
Translators should take care to populate their started translation with the strings from the general.po file for their language using msgmerge. In this way they can avoid using different translations for terms that occur in both files.
Previously, there was a convention of putting .pot and .po files for translations under each module's and theme's ./po subdirectory. Although this was just a common convention, and only Autolocale module was dependent on it, Drupal 6 includes most of Autolocale's functionality and for user friendliness renamed the directory to ./translations. Modules and themes should have their translation templates and translations under the ./translations directory, so that Drupal 6 imports them automatically.
Further reading:
- Translation template extractor project.
- To make sure your module code is set up for translations, read the Localization API section.
- Multilingual Support section of Module Developers guide
- Overview of translation process
