1👍
✅
If you are using Django-version>=1.4. check internationalization for URL patterns.
You can define translations for URLs using ugettext_lazy()
or you can use i18n_patterns
0👍
You should not create URL patterns like this .use
i18n patterns in URL, in urls.py
:
from django.translation import ugettext as _
Then make your URL patterns like this:
url(_(r'^category/(?P<slug>[\w-]+)/))
The translators will translate it.
- [Answer]-Difference between template include and jquery.load?
- [Answer]-Djando CMS with USE_I18N = False
- [Answer]-Django: foreign key display
Source:stackexchange.com