Translating models with django-parler
Django does not provide a solution for translating models out of the box. You have to implement your own solution to manage content stored in different languages, or use a third-party module for model translation. There are several third-party applications that allow you to translate model fields. Each of them takes a different approach to storing and accessing translations. One of these applications is django-parler
. This module offers a very effective way to translate models, and it integrates smoothly with Django’s administration site.
django-parler
generates a separate database table for each model that contains translations. This table includes all the translated fields and a foreign key for the original object that the translation belongs to. It also contains a language field, since each row stores the content for a single language.
Installing django-parler
Install django-parler
via pip
using the following command: