Re: Translated URL's

2014-02-19 Thread werefrog
Felipe, Sorry, I'm quite busy these days. Here is the beginning of something, but I'd prefer to avoid the 'myurl' function. I'm not a dev' so you'll probably jump looking at that. The base idea was to use only 'mypatterns' for obtainning the same results we handwritten previously, including

Re: Translated URL's

2014-02-12 Thread Felipe Mesquita de Oliveira
ly because of the maintenance when adding a language, for example, that would make changing both translation files and all urls.py. Thanks for you time and attention, if an new solution raises, it would be great! Felipe On Friday, February 7, 2014 2:29:18 PM UTC-2, Felipe Mesquita de Oli

Re: Translated URL's

2014-02-11 Thread werefrog
Felipe, Well, if you don't prefix your urls with language code, Django will try to match translated urls in the language retained for the session [1] (black-box guessing). I see multiple options, but the following is the less messy and seems to fit your requirements: # myproject.urls from

Re: Translated URL's

2014-02-10 Thread Felipe Mesquita de Oliveira
Michel, Thanks for you reply. My ideia was to make it without the '/es/' or '/en/' starting the url. Let's say a user share an 'es' link to an american user. Like this: '/ayuda/' I wanted the american user to be able to open it using language defined in user's session ('en'). Thanks in advan

Re: Translated URL's

2014-02-07 Thread werefrog
Hello, I don't know where you're trying the troublesome reverse but maybe the following can help. # myproject.urls from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from django.conf.urls.i18n import i18n_patterns from help.views import HelpVi

Translated URL's

2014-02-07 Thread Felipe Mesquita de Oliveira
Hi all, I'm trying to work with translated URL's, but the behavior I'm getting is not the one I expected. Part of the code is below: from django.utils.translation import ugettext_lazy as _ urlpatterns += patterns('', url(_(r'^help/$'),