Re: Reversing translated urls in templates

2011-07-05 Thread Stephen Kelly
Jannis Leidel wrote: > > On 05.07.2011, at 09:26, Jonathan Slenders wrote: > >> I'm also +1 on {% language lang_code %}... {% endlanguage %} >> >> We are using exactly this template tag for maybe about half a year >> already. Not for i18n urls, but for formatting numbers. The decimal >> separat

Re: Reversing translated urls in templates

2011-07-05 Thread Jannis Leidel
On 05.07.2011, at 09:26, Jonathan Slenders wrote: > I'm also +1 on {% language lang_code %}... {% endlanguage %} > > We are using exactly this template tag for maybe about half a year > already. Not for i18n urls, but for formatting numbers. The decimal > separator in Dutch is a comma, but somet

Re: Reversing translated urls in templates

2011-07-05 Thread Jonathan Slenders
I'm also +1 on {% language lang_code %}... {% endlanguage %} We are using exactly this template tag for maybe about half a year already. Not for i18n urls, but for formatting numbers. The decimal separator in Dutch is a comma, but sometimes we want to be sure to have a dot a some part of the templ

Re: Reversing translated urls in templates

2011-07-04 Thread Sam Bull
I like this quite a bit. It's clean, and it allows for a common i18n pattern where the footer contains a translation link for each supported language, and the language names are localized to themselves (i.e. "Español | Français | Deutsch"). Sam On 2011-07-04, at 5:23 AM, brocaar wrote: > On M

Re: Reversing translated urls in templates

2011-07-04 Thread brocaar
On Monday, July 4, 2011 10:04:10 AM UTC+2, Jannis Leidel wrote: > > Agreed, what about just "language", e.g.: > > {% language lang_code %} > {% trans "Register account" %}: {% url account:register %} > {% endlanguage %} > > > I agree too that the tag name in my example is quite ugly, it was onl

Re: Reversing translated urls in templates

2011-07-04 Thread Jannis Leidel
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 f

Re: Reversing translated urls in templates

2011-07-03 Thread Chris Beaven
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: > >

Re: Reversing translated urls in templates

2011-07-03 Thread Juan Pablo Martínez
I think {% transurl account:register %} would be more convenient to work with i18n_patterns On 3 July 2011 10:42, 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 trans

Re: Reversing translated urls in templates

2011-07-03 Thread brocaar
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" %}:

Re: Reversing translated urls in templates

2011-07-01 Thread Ramiro Morales
On Sat, Jun 25, 2011 at 6:58 AM, Jannis Leidel wrote: > > As I said initially when we discussed this on IRC, I believe a "i18n_url" is > good enough > and would fit well with the other i18n related template tags. > > Besides the ambiguity of a potential keyword argument "lang", I'd like to > men

Re: Reversing translated urls in templates

2011-06-25 Thread Florian Apolloner
On Jun 25, 11:58 am, Jannis Leidel wrote: > As I said initially when we discussed this on IRC, I believe a "i18n_url" is > good enough > and would fit well with the other i18n related template tags. Jupp, I just wanted to here if someone else had different feelings about it. > I believe > thi

Re: Reversing translated urls in templates

2011-06-25 Thread maxk
What do you think about something like below {% url viewname k1=v1, k2=v2 with lang=lang %} ? On Jun 25, 12:52 am, Florian Apolloner wrote: > Hi, > > I would like to get some feedback > onhttps://code.djangoproject.com/ticket/16332 > Jacob suggested that the standard url-tag should take a la

Re: Reversing translated urls in templates

2011-06-25 Thread Jannis Leidel
On 24.06.2011, at 23:52, Florian Apolloner wrote: > I would like to get some feedback on > https://code.djangoproject.com/ticket/16332 > Jacob suggested that the standard url-tag should take a lang argument > so we don't need an extra tag (okay, his actual concern was the > dislike of the name i1

Reversing translated urls in templates

2011-06-24 Thread Florian Apolloner
Hi, I would like to get some feedback on https://code.djangoproject.com/ticket/16332 Jacob suggested that the standard url-tag should take a lang argument so we don't need an extra tag (okay, his actual concern was the dislike of the name i18n_url ;)). I would like that idea too, but I am somewhat

Reversing translated urls in templates

2011-06-24 Thread Florian Apolloner
Hi, I would like to get some feedback on https://code.djangoproject.com/ticket/16332 Jacob suggested that the standard url-tag should take a lang argument so we don't need an extra tag (okay, his actual concern was the dislike of the name i18n_url ;)). I would like that idea too, but I am somewhat