in my .po file i have
msgid "This string will have %s inside."
How can i translate this in template?
I've tried:
{% blocktrans %}This string will have {{ value }} inside.{% endblocktrans %}
and
{% blocktrans with value as value%}This string will ha开发者_开发百科ve {{ value }} inside.{% endblocktrans %}
Neither works for me
As stated in the documentation, the strings should use Python's standard named-string interpolation syntax.
So {% blocktrans %}This string will have {{ value }} inside.{% endblocktrans %}
will use the translation string "This string will have %(value)s inside."
.
精彩评论