Skip to main content

django app, that can be used on multilingual sites

Project description


langswitch - is django app, that can be used on multilingual sites to allow users switch site language, and use some template tags for maintain multilang links etc.

Quick start

1. Add "langswitch" to your INSTALLED_APPS setting like this::


and make sure that you have django.core.context_processors.request in TEMPLATE_CONTEXT_PROCESSORS:


2. Load langswitch in your template:
{% load lang_switch %}

3. Use template tag {% set_lang_from_path %} to activate translation, from url path (like /en/example/article/ for english language or /ru/example/article/ for russian)
this tag also defines variable 'lang' in template context, so you can use it.

4. Also you can just get variable 'lang' to template context with {% get_lang %} template tag

Project details

Download files

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

Files for django-langswitch, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size (6.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page