From a9a0197e3c63cc8abc965369d252cca9e866be6d Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Tue, 10 Sep 2024 18:23:08 +0300 Subject: [PATCH] Improve documentation for initializing the i18n extension Refs discussion at https://stackoverflow.com/a/78970088 --- docs/extensions.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/extensions.rst b/docs/extensions.rst index 45ead3b7..9b15e813 100644 --- a/docs/extensions.rst +++ b/docs/extensions.rst @@ -39,6 +39,10 @@ After enabling, an application has to provide functions for ``gettext``, globally or when rendering. A ``_()`` function is added as an alias to the ``gettext`` function. +A convenient way to provide these functions is to call one of the below +methods depending on the translation system in use. If you do not require +actual translation, use ``Environment.install_null_translations`` to +install no-op functions. Environment Methods ~~~~~~~~~~~~~~~~~~~ -- 2.47.2