Document using ngettext in plugins

This commit is contained in:
Kovid Goyal 2023-08-18 07:41:14 +05:30
parent 2ae0742c98
commit 17c6d84269
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -292,6 +292,11 @@ with the ``CALIBRE_OVERRIDE_LANG`` environment variable set. For example::
Replace ``de`` with the language code of the language you want to test. Replace ``de`` with the language code of the language you want to test.
For translations with plurals, use the ``ngettext()`` function instead of
``_()``. For example::
ngettext('Delete a book', 'Delete {} books', num_books).format(num_books)
The plugin API The plugin API
-------------------------------- --------------------------------