]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Improve documentation for initializing the i18n extension 2023/head
authorAarni Koskela <akx@iki.fi>
Tue, 10 Sep 2024 15:23:08 +0000 (18:23 +0300)
committerAarni Koskela <akx@iki.fi>
Tue, 10 Sep 2024 15:42:07 +0000 (18:42 +0300)
Refs discussion at https://stackoverflow.com/a/78970088

docs/extensions.rst

index 45ead3b71949c538a219fca450e1aa5ee9775b1d..9b15e813e7b1820acb1f1568c8195ac3bb0b9eec 100644 (file)
@@ -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
 ~~~~~~~~~~~~~~~~~~~