Django has full support for internationalization of text in code and templates, and format localization of dates and numbers. Here’s how it works.
Essentially, Django does two things:
The complete process can be seen as divided in three stages. It is also possible to identify an identical number of roles with very well defined responsibilities associated with each of these tasks (although it’s perfectly normal if you find yourself performing more than one of these roles):
For more general information about the topic, see the GNU gettext documentation and the Wikipedia article.
First lets define some terms that will help us to handle a common language:
Django’s translation machinery uses the standard gettext module that comes with Python. If you know gettext, you might note these specialties in the way Django does translation:
Oct 05, 2011