May 2018
Beginner to intermediate
526 pages
11h 57m
English
For plural forms, you can use ngettext() and ngettext_lazy(). These functions translate singular and plural forms depending on an argument that indicates the number of objects. The following example shows how to use them:
output = ngettext('there is %(count)d product', 'there are %(count)d products', count) % {'count': count}
Now that you know the basics about translating literals in our Python code, it's time to apply translations to our project.
Read now
Unlock full access