Code

Changes between Version 13 and Version 14 of ContributedMiddleware


Ignore:
Timestamp:
07/02/06 13:10:52 (8 years ago)
Author:
jon1012
Comment:

added my advanced locale from url middleware

Legend:

Unmodified
Added
Removed
Modified
  • ContributedMiddleware

    v13 v14  
    2121Closes a site to only authenticated users. 
    2222 
     23 
     24=== [http://www.jondesign.net/articles/2006/jul/02/langue-depuis-url-django-url-locale-middleware/ Advanced Locale from URL middleware] by Jonathan Schemoul === 
     25 
     26Replace the standard locale middleware with this one (or just use the two at the same time) to be able to set the language from the url. 
     27For example /fr/article/... shows you the article in French, and /en/article/... shows it in English. 
     28This version of the Locale from URL Middleware also sets a cookie and a request var whenever you go to a webpage that has a language set in it's url, so that it serves you the correct version when you go to a page that doesn't have any language code in it's url.