Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #35306 -- Updated 5.0 Docs #18028

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions docs/ref/settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1843,16 +1843,18 @@ standard :term:`language ID format <language code>`. For example, U.S. English
is ``"en-us"``. See also the `list of language identifiers`_ and
:doc:`/topics/i18n/index`.

:setting:`USE_I18N` must be active for this setting to have any effect.

It serves two purposes:
It serves three purposes:

* If the locale middleware isn't in use, it decides which translation is served
to all users.
* If the locale middleware is active, it provides a fallback language in case the
user's preferred language can't be determined or is not supported by the
website. It also provides the fallback translation when a translation for a
given literal doesn't exist for the user's preferred language.
* If localization is explicitly disabled via the :tfilter:`unlocalize` and
:ttag:`{% localize off %}<localize>` template filters or tags, it provides fallback
localization formats which will be applied instead. See
:ref:`controlling localization in templates <topic-l10n-templates>` for details.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is not complete. However, as a non-native speaker, I'll happily defer choosing a better formulation to someone else.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, "see" needs to be capitalized and it would be good to end with "for [insert something]".
You can just say "for more details" but you might want to be more specific like "for further explanation on [insert something]."
Rough example:

See :ref:`controlling localization in templates <topic-l10n-templates>` for more details.

See :ref:`how-django-discovers-language-preference` for more details.

Expand Down Expand Up @@ -3666,6 +3668,9 @@ Forms
* :setting:`FORM_RENDERER`
* :setting:`FORMS_URLFIELD_ASSUME_HTTPS`


.. _globalization-settings:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new unused reference, I believe the start of implementing this comment.


Globalization (``i18n``/``l10n``)
---------------------------------
* :setting:`DATE_FORMAT`
Expand Down
4 changes: 4 additions & 0 deletions docs/topics/i18n/formatting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ control localization over a large section of a template, use the
Returns a string representation for unlocalized numbers (``int``, ``float``,
or ``Decimal``).

When localization is disabled with the template filters and tags described
above, the :setting:`general formatting settings <l10n>` provide localization
formats to apply instead.

.. _custom-format-files:

Creating custom format files
Expand Down