Skip to main content

ngettext

No overview available.

def ngettext(
singular: string,
plural: string,
number: integer
) - > string

Translates a message and selects the appropriate plural form based on the provided numeric value.

Parameters

NameTypeDescription
singularstringThe default singular form of the message to be translated.
pluralstringThe default plural form of the message to be translated.
numberintegerThe numeric value used to determine which plural form of the message should be used.

Returns

TypeDescription
stringThe translated string in either singular or plural form, depending on the value of the number parameter.