开发者

How to properly i18n a string

This more or less complex phrase to translate 开发者_如何学Pythonin my Django template is:

This site is owned by "<a href="url">The Company Name</a>" and is maintained by partner organizations.

Is it as simple as:

{% trans "This site is owned by "<a href="url">The Company Name</a>" and is maintained by partner organizations." %}

Thank you.


From a translation point of view, as long as the translator translates the entire string just like that, you are OK. By that I mean that they put the href around the company name.

From a technical point of view you might want to check out this page: http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/

trans template tag

The {% trans %} template tag translates either a constant string (enclosed in single or double quotes) or variable content:

<title>{% trans "This is the title." %}</title>
<title>{% trans myvar %}</title>

So it appears

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜