do_ntranslate
Translates a pluralizable string by delegating to the active translation object or a default translation instance based on the provided translation function and count.
def do_ntranslate(
singular: string,
plural: string,
number: integer,
translation_function: string
) - > string
Handles plural-aware translations by delegating to the currently active translation object or falling back to the default system language.
Parameters
| Name | Type | Description |
|---|---|---|
| singular | string | The default singular form of the message to be translated. |
| plural | string | The default plural form of the message to be translated. |
| number | integer | The count used to determine which plural form of the translation should be selected. |
| translation_function | string | The name of the method to invoke on the translation object, such as 'ngettext' or 'npgettext'. |
Returns
| Type | Description |
|---|---|
string | The translated string corresponding to the provided number, retrieved using the specified translation method. |