Apr-09-2026, 03:44 PM
I'm using Django to develop a project. I can internationalize the templates easily.
But I have to translate a field in a template to represent the gender of people. This gender is in a database so I show in a template as {{person.gender}}.
How can I translate the value of the gender in the template,so, if I get 'male' from the database, the template display 'Hombre' for Spanish browsers?
But I have to translate a field in a template to represent the gender of people. This gender is in a database so I show in a template as {{person.gender}}.
How can I translate the value of the gender in the template,so, if I get 'male' from the database, the template display 'Hombre' for Spanish browsers?
--
Adrián E. Córdoba
Adrián E. Córdoba
