Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion language code in subdomain
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joost Cassee  
View profile  
 More options Sep 24 2008, 3:46 pm
From: Joost Cassee <jo...@cassee.net>
Date: Wed, 24 Sep 2008 21:46:09 +0200
Local: Wed, Sep 24 2008 3:46 pm
Subject: Re: language code in subdomain

On 24-09-08 01:41, SamBull wrote:

> I'm also nursing some wacky ideas for how to support translated URLs
> (I mean, translations of the actual URLs so the words in them
> correspond the active locale). I haven't been able to find any
> discussion on how people do this, so it's either a bad idea or a
> really hard problem or both. Still, if anybody's interested, drop me a
> line. I can share my crackpot schemes. :)

What I really dislike about localeurl is that it requires
monkey-patching urlresolvers.reverse(). Malcolm Tredinnick dropped a
remark the other day on django-developers:

On 17 sep, 02:14, Malcolm Tredinnick <malc...@pointy-stick.com> wrote:

> You can already put any object you like that has a resolve() method into
> urlpatterns(). That object can see every single pattern that passes
> through if it is matched for the pattern ''. We have to *some* kind of
> root object and it happens to be RegexURLResolver.

So here is my idea: localeurl could be based on some class pretending to
be a RegexPattern / RegexURLResolver combination. Not sure yet how that
would work, but this would fit in with other special URL mangling
functionality.

This could work something like this:

urls.py:
urlpatterns = patterns(
    localepatterns(
        url(...),
    ),
    url(...),
)

Locale dependent paths would go into localepatterns. This would also
make the LOCALE_INDEPENDENT_PATHS obsolete.

Regards,

Joost

--
Joost Cassee
http://joost.cassee.net

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.