O'Reilly logo

Django Project Blueprints by Asad Jibran Ahmed

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Translating our static content

The first thing that we want to do is translate all the static content on our site. This includes all the headlines, links, and form labels that you have seen in the preceding three screens. To translate strings that are used in templates, Django provides us with a trans template tag. Let's take a look at how to use it first in a simple context, and then I'll go into the details of how it works. This is a slightly long section as we will do a lot of things here that make up the foundation of the translation feature of Django.

Tip

Don't be alarmed if you don't understand something. Just keep following the instructions. I'll go into a lot of depth about each step, but first I want to show you exactly how translations ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required