mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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:
@@ -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
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user