Fixed #11585 -- Added ability to translate and prefix URL patterns with a language code as an alternative method for language discovery. Many thanks to Orne Brocaar for his initial work and Carl Meyer for feedback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-06-15 17:29:10 +00:00
parent 62bb4b8c37
commit 896e3c69c7
29 changed files with 750 additions and 57 deletions

View file

@ -167,6 +167,16 @@ a :class:`~django.forms.fields.GenericIPAddressField` form field and
the validators :data:`~django.core.validators.validate_ipv46_address` and
:data:`~django.core.validators.validate_ipv6_address`
Translating URL patterns
~~~~~~~~~~~~~~~~~~~~~~~~
Django 1.4 gained the ability to look for a language prefix in the URL pattern
when using the new :func:`django.conf.urls.i18n.i18n_patterns` helper function.
Additionally, it's now possible to define translatable URL patterns using
:func:`~django.utils.translation.ugettext_lazy`. See
:ref:`url-internationalization` for more information about the language prefix
and how to internationalize URL patterns.
Minor features
~~~~~~~~~~~~~~