Skip to main content

A Django application that allow you to specify the language of a page in the URL.

Project description

The localeurl Django application allows you to specify the language of a page in the URL.

Suppose you have a Django website in multiple languages. Using localeurl, without modifying your URLconfs, you can have URLs like this: http://www.example.com/nl/company/profile. Any URLs without a language prefix will be redirected to add the prefix for the default language (or, optionally, the language preferred in the user’s browser settings).

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.

  • If you don’t set the language via the 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 prefer a simple link for changing the language, and localeurl allows this.

You can install localeurl with pip:

pip install django-localeurl

or install the in-development version:

pip install django-localeurl==dev

See the full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-localeurl-2.0.2.tar.gz (18.7 kB view details)

Uploaded Source

File details

Details for the file django-localeurl-2.0.2.tar.gz.

File metadata

File hashes

Hashes for django-localeurl-2.0.2.tar.gz
Algorithm Hash digest
SHA256 d318ce7cbb739f4bf070a94393a36f9c07428f0fcf17e618c29fe6e4198238c3
MD5 7b656fe5e6ecdc6733c2565434f9f00d
BLAKE2b-256 f662508d2d483f5da3af640f228cc5e4bdfe635550db1fb3c7043f93acae2ce0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page