Skip to content

peopledoc/django-i18nurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING: this project is not maintained

Django i18n URL

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",
    "...",
)

About

Django i18n url lets you manage your multilingual url using Django.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages