workflow

  1. create/update *.po message file
  2. translate strings in *.po message file
  3. compile *.po message files into *.mo (binary optimized files for use by gettext)

We provide a management command for makemessages and compilemessages:

pylucid_project/apps/pylucid_admin/management/commands/L10n.py

How to create language files

for example, create/update german (de) message file:

1
/var/www/YourSite$ ./manage.py L10n make -l de

Update all message files for all languages and all PyLucid apps, run this:

1
/var/www/YourSite$ ./manage.py L10n make

To update one or more apps, do this:

1
2
3
4
5
# update messages only for the blog app:
/var/www/YourSite$ ./manage.py L10n make blog

# update auth and lexicon apps
/var/www/YourSite$ ./manage.py L10n make auth lexicon

translate

Good editor is gtranslator. (install with aptitude installgtranslator)

Open *.po file, translate strings and save.

compile message files

To compile all *.po files to *.mo files, run this:

1
2
3
4
5
# compile messages for all apps:
/var/www/YourSite$ ./manage.py L10n compile

# Only for some apps:
/var/www/YourSite$ ./manage.py L10n compile blog lexicon

Links

More detailed instructions: