Django uses the internationalization mechanism to translate verbose strings in the code and templates. However, it's up to the developer to decide how to implement the multilingual content in the models. There are several third-party modules that handle translatable model fields; however, I prefer the simple solution that will be introduced to you in this recipe.
The advantages of the approach that you will learn about are as follows:
It is straightforward to define multilingual fields in the database
It is simple to use the multilingual fields in database queries
You can use contributed administration to edit models with the multilingual fields without additional modifications
If you need it, you can easily show all the translations of an object in the same template
You can use database migrations to add or remove languages
Do you have the utils
package created? You will now need a new fields.py
file for the custom model fields there.