当行已经用单引号包装时,如何在trans中转义单引号?

时间:2012-09-30 17:29:40

标签: django

{% trans 'Enter your friend's name and email below, and click "send invite" to invite your friend.' %}

该行已经用单引号括起来,并且该行中也使用了双引号。那么我怎么能在这里逃避friend's

2 个答案:

答案 0 :(得分:5)

我实际上找到了它。使用blocktrans可以让你拥有任何东西,混合和匹配。 :)

{% blocktrans %}Enter your friend's name and email below, and click "send invite" to invite your friend.{% endblocktrans %}

答案 1 :(得分:3)

{% trans 'Enter your friend's name and email below, and click "send invite" to invite your friend.' %}