Importing New Projects

A translation project is composed of some POT files (PO template files, with extension .pot) and some PO files (.po extension) for each translation language. The name of the PO files should match that of the template (POT) files, except for the extension. New projects on B-Translator can be added both from the GUI or from the command line terminal (if you have access to the server).

For adding a new project from the web interface you have to put all the POT files in the directory pot/, and all the PO files in directories named after the code of the language (for example sq/, fr/, de/, etc.) Then you should create an archive of all these directories (for example a .tgz archive), and then upload it here:, at the import section. This will schedule the uploaded project for import and it will be done in about 1 or 2 hours.

From the terminal you can use drush commands, like this:

cd /var/www/data/
drush btr-project-add --user="user name" test project1 /path/to/pot/files/
drush btr-project-import --user="user name" test project1 lng1 /path/to/po/files/of/lng1
drush btr-project-import --user="user name" test project1 lng2 /path/to/po/files/of/lng2
drush btr-project-import --user="user name" test project1 lng3 /path/to/po/files/of/lng3
drush btr-project-list --origin=test
drush btr-project-delete --origin=test --project=project1 --erase=true --purge=true

For example, here is a simple script that does this: modules/custom/btrCore/data/test/

In the directory modules/custom/btrCore/data/import/ there are some scripts that can be used to import the translations of some well known open source projects.