Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peopledoc/django-i18nurl
Django i18n url lets you manage your multilingual url using Django.
https://github.com/peopledoc/django-i18nurl
approved-public ghec-mig-migrated
Last synced: 17 days ago
JSON representation
Django i18n url lets you manage your multilingual url using Django.
- Host: GitHub
- URL: https://github.com/peopledoc/django-i18nurl
- Owner: peopledoc
- License: other
- Created: 2013-06-06T16:15:31.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-09-30T08:02:03.000Z (over 8 years ago)
- Last Synced: 2024-12-14T17:46:18.760Z (19 days ago)
- Topics: approved-public, ghec-mig-migrated
- Language: Python
- Size: 32.2 KB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
**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.* Authors: Rémy Hubscher and `contributors
`_
* Licence: BSD
* Compatibility: Django 1.5+, python2.7 up to python3.3
* Project URL: https://github.com/novagile/django-i18nurlGetting 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",
"...",
)