django 的 trans 方法中的转义引号
我正在尝试使用 django 中的 {% trans "string" %}
方法来国际化我的网页。
但是,当我尝试在字符串中使用引号时出现错误。我已经尝试用反斜杠来逃避它们,但没有成功。
我怎样才能逃避这样的事情:
{% trans "foo's is like "foo"." %}
正如我所说,这不起作用:
{% trans "foo\'s is like \"foo\"." %}
有什么想法吗?
谢谢
I'm trying to internationalize my webpages by using the {% trans "string" %}
method in django.
However I get an error when I try to use quotes in the string. I've already tried to escape them with a backslash with no luck.
How can I escape something like this:
{% trans "foo's is like "foo"." %}
As I said, this doesn't work:
{% trans "foo\'s is like \"foo\"." %}
Any idea?
Thanks