diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-12-26 14:33:47 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-12-26 14:44:57 +0100 |
| commit | e2396bf1220c543ee8d15c7640481889caace61d (patch) | |
| tree | fb01a5051db54c43dda5562edffff87bdf0b06c3 /docs | |
| parent | 0c79e5e347e3c5d3f942d4338bb5476f0277cd21 (diff) | |
[1.5.x] Updated documentation on localflavor translations
to account for the deprecation of django.contrib.localflavor in 1.5.
Refs #19482.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/localflavor.txt | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/docs/ref/contrib/localflavor.txt b/docs/ref/contrib/localflavor.txt index 84569feebe..83d7837b92 100644 --- a/docs/ref/contrib/localflavor.txt +++ b/docs/ref/contrib/localflavor.txt @@ -142,13 +142,14 @@ default formats. Here's an example of how to use them:: class MyForm(forms.Form): my_date_field = generic.forms.DateField() -Internationalization of localflavor -=================================== +Internationalization of localflavors +==================================== -Localflavor has its own catalog of translations, in the directory -``django/contrib/localflavor/locale``, and it's not loaded automatically like -Django's general catalog in ``django/conf/locale``. If you want localflavor's -texts to be translated, like form fields error messages, you must include -:mod:`django.contrib.localflavor` in the :setting:`INSTALLED_APPS` setting, so -the internationalization system can find the catalog, as explained in -:ref:`how-django-discovers-translations`. +To activate translations for a newly-created ``localflavor`` application, you +must include the application's name (e.g. ``django_localflavor_jp``) in the +:setting:`INSTALLED_APPS` setting, so the internationalization system can find +the catalog, as explained in :ref:`how-django-discovers-translations`. + +If you're still using the legacy ``localflavor`` application, you must include +:mod:`django.contrib.localflavor` in :setting:`INSTALLED_APPS` (that will +raise a ``DeprecationWarning``). |
