Skip to main content
=====
langswitch
=====

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::

INSTALLED_APPS = (
...
'langswitch',
)

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

TEMPLATE_CONTEXT_PROCESSORS = (
...
'django.core.context_processors.request',
...
)

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

Download files

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

Source Distribution

django-langswitch-0.1.zip (6.3 kB view details)

Uploaded Source

File details

Details for the file django-langswitch-0.1.zip.

File metadata

  • Download URL: django-langswitch-0.1.zip
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-langswitch-0.1.zip
Algorithm Hash digest
SHA256 5ff8e66b53207673d0ee353f74e9e788e0623e573dea0b04ec0e07dab7a08494
MD5 908f66a4f8a2442381caf04faa78e505
BLAKE2b-256 62697e148c3eb44ba857e4cc1fd26e0f792d5907b4d8dfc3fc9eb8394fde9377

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

1 file

This release

0.1 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page