internationalization - django translate variable content in template -
i'm using {% trans %} template tag. django docs say:
the {% trans %} template tag translates either constant string (enclosed in single or double quotes) or variable content:
{% trans "this title." %} {% trans myvar %}
https://docs.djangoproject.com/en/1.3/topics/i18n/internationalization/#trans-template-tag
i found impossible {% trans myvar %} because myvar doesn't show in django.po file after running makemessages command.
am using wrong? me this?
you can use blocktrans
template tag in case:
{% blocktrans %} title: {{ myvar }} {% endblocktrans %}
Comments
Post a Comment