I'm using {% trans %} template tag. Django docs say:
The {% trans %} template tag translates either a constant string (enclosed in single or double quotes) or variable content: {% trans "This is the title." %} {% trans myvar %}
The {% trans %} template tag translates either a constant string (enclosed in single or double quotes) or variable content:
{% trans "This is the title." %} {% trans myvar %}
https://docs.djangoproject.com/en/1.3/topics/i18n/internationalization/#trans-template-tag
I found it impossible to do {% trans myvar %} because myvar simply doesn't show up in django.po file after running makemessages command.
Am I using it wrong? Could some help me with this?
You can use the blocktrans template tag in this case:
blocktrans
{% blocktrans %} This is the title: {{ myvar }} {% endblocktrans %}
2.1m questions
2.1m answers
60 comments
57.0k users