Как правильно сделать строку? - PullRequest
0 голосов
/ 06 августа 2010

Эта более или менее сложная фраза для перевода в моем шаблоне Django:

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

Это так просто:

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

Спасибо.

1 Ответ

1 голос
/ 06 августа 2010

С точки зрения перевода, если переводчик переводит всю строку просто так, у вас все в порядке.Под этим я подразумеваю, что они указывают на название компании.

С технической точки зрения вы можете проверить эту страницу: 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>

Похоже,

...