Hello,

I'm having a template, where a link shall be inside a translation-
marked text. I see two ways how to accomplish this, but both don't
work:
1. {% trans "You need to <a href="{% url login %}">login</a> before
you can do anything" %}
    I get an template syntax error: "Searching for value. Unexpected
end of string" (because of the quotes). Escaping the quotes or taking
single quotes also didn't work
2. {% blocktrans %}You need to <a href="{% url login %}">login</a>
before you can do anything {% endblocktrans %}
    Again template syntax error: "'blocktrans' doesn't allow other
block tags (seen u'url login') inside it"

Is there a way with either of these tags to accomplish what I want? Of
course there would also be the possibility to mark each single part of
the text, like so:
3. {% trans "You need to " %}<a href="{% url login %}">{% trans "login
</a> before you can do anything" %}
But I don't want to split the string in the middle of a sentence.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to