Hola, Hello, Guten Tag, Buongiorno

Guidebooks

When the time comes to translate a project I find another reason why I love Django. Django handles all the magic and manipulation of gettext and it associated files. Just encapsulate your strings as you go along with a simple function conveniently aliased using Python’s import as scheme and you are set. Before:

print "Hello world"

After:

from django.utils.translation import ugettext as _
print _("Hello world")

that’s all you need to add to your code to let Django know that string is to be translated.

For the actual translation of the strings there are several utilities but none come closer to the magic provided by Transifex. Once you set your resource file, it is a simple matter of issuing:

tx push -s

and anyone can translate your software, even if they don’t know anything about software development or not even in your development team. Transifex’s dashboard makes it very easy to see how complete are the translations of your resources, by resources and per language. Every once in a while or when the translation is complete just do a:

tx pull

compile your new translation files and you are done!

Reference: