Malcolm and Alex,

thanks, but I gave up. This was not a good idea :)

2008/3/31, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>  Perhaps you could try doing a per request url conf:
>  http://www.b-list.org/weblog/2007/nov/06/urlconf/ I'm not sure how
>  this would work, but I think it might help, although I guess you'd
>  need a URL conf for each languages :/
>
>  On Mar 30, 11:58 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
>  wrote:
>
> > On Fri, 2008-03-28 at 06:13 -0300, Marinho Brandao wrote:
>  > > Hi,
>  >
>  > > I had tryied several ways a lot of time trying to localize my URLs,
>  > > like in django-authopenid [1]
>  >
>  > > but I had have the same result: when I change the current language,
>  > > everything works but URLs stills in old language. When I restart
>  > > server, it works, but when I change again, the same happens...
>  >
>  > > am I wrong trying to localize URLs or am I forgotting something 
> important?
>  >
>  > > example of my URLs:
>  >
>  > > urlpatterns = patterns('',
>  > >     url(r'^%s' % _('channels/'), include('apps.videos.urls.channels')),
>  > > }
>  >
>  > That code is only going to be executed once: when the URL configuration
>  > is imported. Not on every request. So it won't work as you expect.
>  >
>  > If you really want to supply URL aliases like this, you'll need to do
>  > the processing in your view to work out which URL they really requested
>  > and dispatch that appropriately. That would be a very large amount of
>  > work, since you'd have to accept pretty much any legal string and then
>  > the view works out if it's valid or not and you would essentially be
>  > reimplementing the URL dispatcher from Django.
>  >
>  > This isn't impossible, but it's not something Django provides out of the
>  > box.
>  >
>  > Regards,
>  > Malcolm
>  >
>  > --
>  > The cost of feathers has risen; even down is 
> up!http://www.pointy-stick.com/blog/
>  >
>


-- 
Marinho Brandão (José Mário)
http://marinho.webdoisonline.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to