ngettext
Returns the singular or plural form of a string based on the provided number.
def ngettext(
singular: string,
plural: string,
number: integer
) - > string
Selects between a singular and plural string based on a provided numeric value.
Parameters
| Name | Type | Description |
|---|---|---|
| singular | string | The string to return when the count represents a single item. |
| plural | string | The string to return when the count represents multiple items (not equal to 1). |
| number | integer | The numeric value used to determine which string form to select. |
Returns
| Type | Description |
|---|---|
string | The singular string if the number is 1, otherwise the plural string. |