Loading docs/ref/contrib/localflavor.txt +11 −10 Original line number Diff line number Diff line Loading @@ -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 =================================== 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`. Internationalization of localflavors ==================================== 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``). Loading
docs/ref/contrib/localflavor.txt +11 −10 Original line number Diff line number Diff line Loading @@ -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 =================================== 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`. Internationalization of localflavors ==================================== 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``).