On 04.07.2011, at 02:48, Chris Beaven wrote:
>
> On Monday, July 4, 2011 1:42:37 AM UTC+12, brocaar wrote:
> What about not implementing this as a url tag but as a translation-
> override tag? Then it is not only possible to specify the language to
> use for your URL translation, but as well for other translatable
> content. Example:
>
> {% transoverride language_code %}
> {% trans "Register account" %}: {% url account:register %}
> {% endtransoverride %}
Oh, I like that much better, too.
> That does have the advantage of being more flexible even in just the context
> of urls. For example, referring to a url via {{ obj.get_absolute_url }}.
> +1 for more flexibility.
>
> That's one ugly tag name though :D
Agreed, what about just "language", e.g.:
{% language lang_code %}
{% trans "Register account" %}: {% url account:register %}
{% endlanguage %}
Jannis
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.