Skip to main content

Django i18n URL

Project description

Django i18n url lets you manage your multilingual url using Django. You can change the language and stay on the same page.

Getting Started

Install django-i18nurl:

pip install django-i18nurl

Add it to your INSTALLED_APPS settings:

INSTALLED_APPS = (
    '...',
    'i18nurl',
)

Using it

Python

Use it in Python code:

from i18nurl import reverse_i18n

url_de = reverse_i18n('app:home', 'de')

Django template

Use it as a templatetag:

{% load i18nurl %}
{% i18nurl 'app:home' 'de' %}

Get the current page in other languages:

{% load i18nurl %}
{% current_i18nurl 'de' %}

Note: to use current_i18nurl template tag you will need the request context processors:

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

django-i18nurl-0.1.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file django-i18nurl-0.1.tar.gz.

File metadata

File hashes

Hashes for django-i18nurl-0.1.tar.gz
Algorithm Hash digest
SHA256 1816d8a9961c4a99d885656715b814b24a84ba3c590f26408fa2410486b1160c
MD5 3eee9909b5e01041d04dd875930c7e28
BLAKE2b-256 d682e6151ae281d389cce5c1b628d8f320418f13491f64bc1afa3971b19d8f9b

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