Skip to content
Painless translations in django, using the regular ORM. Integrates easily into existing projects and apps. Easy convertible from django-multilingual-ng.
Python HTML
Find file
New pull request


django-hvad package coverage build

Model translations made easy.

This project adds support for model translations in Django. It is designed to be unobtrusive, efficient and reliable. On the technical side, it uses an automatically created Translations Model to store translatable fields in arbitrary languages with a foreign key to the main model, enabling fast queries.

Started in 2011, hvad has grown mature and is now used on large scale applications.

Quick links:


  • Simple - only 3 new queryset methods.
  • Natural - use Django ORM as usual, it just became language aware.
  • Fast - no additional queries for reads, just an inner join to an indexed key.
  • Complete - relationships, custom managers and querysets, proxy models, and abstract models.
  • Batteries included - translation-enabled forms and admin are provided.
  • Reliable - more than 300 test cases and counting. coverage build
  • Compatible with Django 1.4 to 1.9, running Python 2.7, 3.3, 3.4 or 3.5.

Django-hvad also features support for Django REST framework 3.1 or newer, including translation-aware serializers.

Example Uses

Declaring a translatable Book model:

class Book(TranslatableModel):
    author = models.ForeignKey(Author)
    release = models.Date()

    translations = TranslatedFields(
        title = models.CharField(max_length=250)

Thus, only the title will vary based on the language. Release date and author are shared among all languages. Let's now create a Book instance:

# The recommended way:
book = Book.objects.language('en').create(
    author = Author.objects.get(name='Antoine de Saint Exupéry'),
    release =, 4, 6),
    title = "The Little Prince",

# Also works
book = Book(language_code='en') = Author.objects.get(name='Antoine de Saint Exupéry')
book.release =, 4, 6)
book.title = "The Little Prince"

Providing some translations:

book.title = "Le Petit Prince"
book.title = "Der kleine Prinz"

Every call to translate() creates a new translation from scratch and switches to that translation; save() only saves the latest translation. Let's now perform some language-aware queries:


Compatible by default: returns all objects, without any translated fields attached. Starting from v1.0, default behavior can be overriden to work like next query:


Returns all objects as translated instances, but only the ones that are translated into the currect language. You can also specify which language to get, using e.g.:


Usual queryset methods work like they always did: let's get all books as translated instances, filtering on the title attribute, returning those that have Petit Prince in their French title, ordered by publication date (in their French edition):

Book.objects.language("fr").filter(title__contains='Petit Prince').order_by('release')

Other random examples:

# last German book published in year 1948

# other books from the same author as mybook. Cache author as well.

# books that have "Django" in their title, regardless of the language

More examples in the quickstart guide.


Django-hvad uses the same release pattern as Django. The following versions are thus available:

  • Stable branch 1.2, available through PyPI and git branch releases/1.2.x.
  • Stable branch 1.3, available through PyPI and git branch releases/1.3.x.
  • Stable branch 1.4, available through PyPI and git branch releases/1.4.x.
  • Development branch 1.5, available through git branch master.

Stable branches have minor bugfix releases as needed, with guaranteed compatibility. See the installation guide for details, or have a look at the release notes.

Thanks to

Jonas Obrist ( for making django-nani and for helping me with this project.

Kristian Øllegaard ( for django-hvad and trusting me to continue the development.

Something went wrong with that request. Please try again.