tags:

views:

36

answers:

1

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 have {{ value }} inside.{% endblocktrans %}

Neither works for me

+1  A: 

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.".

SmileyChris