A Django application that allow you to specify the language of a page in the URL.
Suppose you have a Django website in multiple languages. The localeurl application allow you to specify the language of a page in the URL, like so: http://www.example.com/nl/company/profile. Any URLs without language prefix will be redirected to add the prefix for the default language.
Some reasons for using localeurl:
- Search engines will index all languages.
- Every page should have a unique URL. If you feel that different languages means different pages, then each language should get its own unique URL.
- Setting the language for the website should be done using a POST request (because it influences subsequent page views, see Django ticket #3651). You might not want to use POST requests.
Getting localeurl
Option 1: Get the latest release
The latest release of localeurl is 1.3. First download django-localeurl-1.3.tar.gz. Then:
tar xzvf django-localeurl-1.3.tar.gz cd django-localeurl-1.3 sudo python setup.py install
You can find the documentation in the docs directory or online.
Option 2: Get the trunk from the repository
The latest changes will only be in the source repository. Get it using this shell command, which requires Subversion:
svn co http://django-localeurl.googlecode.com/svn/trunk/ django-localeurl
You can find the documentation in the docs directory or online.