diff --git a/docs/advanced_topics/i18n/index.rst b/docs/advanced_topics/i18n/index.rst index ac99cccf6..fe61934f6 100644 --- a/docs/advanced_topics/i18n/index.rst +++ b/docs/advanced_topics/i18n/index.rst @@ -24,14 +24,7 @@ Change Wagtail admin language on a per user basis Logged-in users can set their preferred language from ``/admin/account/``. By default, Wagtail provides a list of languages that have a >= 90% translation coverage. -It is possible to override this list via the ``WAGTAILADMIN_PERMITTED_LANGUAGES`` setting. - -Example: - -.. code-block:: python - - from django.conf import settings - WAGTAILADMIN_PERMITTED_LANGUAGES = [ ('en' , 'English'), ('pt', 'Portuguese') ] +It is possible to override this list via the :ref:`WAGTAILADMIN_PERMITTED_LANGUAGES` setting. In case there is zero or one language permitted, the form will be hidden. diff --git a/docs/advanced_topics/settings.rst b/docs/advanced_topics/settings.rst index 2c3dbfb72..53082dae3 100644 --- a/docs/advanced_topics/settings.rst +++ b/docs/advanced_topics/settings.rst @@ -407,6 +407,28 @@ Date and DateTime inputs Specifies the date and datetime format to be used in input fields in the Wagtail admin. The format is specified in `Python datetime module syntax `_, and must be one of the recognised formats listed in the ``DATE_INPUT_FORMATS`` or ``DATETIME_INPUT_FORMATS`` setting respectively (see `DATE_INPUT_FORMATS `_). +.. _WAGTAILADMIN_PERMITTED_LANGUAGES: + +Admin languages +--------------- + +Users can choose between several languages for the admin interface +in the account settings. The list of languages is by default all the available +languages in Wagtail. To change it, set ``WAGTAILADMIN_PERMITTED_LANGUAGES``: + +.. code-block:: python + + WAGTAILADMIN_PERMITTED_LANGUAGES = [('en', 'English'), + ('pt', 'Portuguese')] + +Since the syntax is the same as Django ``LANGUAGES``, you can do this so users +can only choose between front office languages: + +.. code-block:: python + + LANGUAGES = WAGTAILADMIN_PERMITTED_LANGUAGES = [('en', 'English'), + ('pt', 'Portuguese')] + URL Patterns ~~~~~~~~~~~~