Django Translation Creating Locale Folders by Eric on February 1, 2020
As our huge project progresses we need to start thinking about some of the major features that our users would like to see. The first is less of a feature and more of a necessity. Our users are located all over the world and speak four different languages. To accommodate all of these users we need to translate every bit of text on every page of our application for all of our users. Luckily for us Django handles translation very nicely. Read up on the Django translation here. This post will only cover the template tag {% trans %}, more will come as we develop more of our translation setup. Every template generated will need the tag {% load i18n %} at the top to have access to the trans tag. From this point on any text string will need to be surrounded by the trans tag. For example, my button has the code `Home` and to use the translation I simply change it to `{% trans "Home" %}`. That string after the trans is going to be the id for the soon-to-be-created translation files...