WordPress как на ладони
wordpress jino
фильтр не описан

ngettext хук-фильтр . WP 2.2.0

Filters the singular or plural form of a string.

Использование

add_filter( 'ngettext', 'filter_function_name_2620', 10, 5 );
function filter_function_name_2620( $translation, $single, $plural, $number, $domain ){
	// filter...

	return $translation;
}
$translation(string)
Translated text.
$single(string)
The text to be used if the number is singular.
$plural(string)
The text to be used if the number is plural.
$number(string)
The number to compare against to use either the singular or plural form.
$domain(string)
Text domain. Unique identifier for retrieving translated strings.

Связи хука

Используется в: _n()

Кусок кода с хуком

Фрагмент из: wp-includes/l10n.php WP 4.9
...
function _n( $single, $plural, $number, $domain = 'default' ) {
	$translations = get_translations_for_domain( $domain );
	$translation  = $translations->translate_plural( $single, $plural, $number );

	/**
	 * Filters the singular or plural form of a string.
	 *
	 * @since 2.2.0
	 *
	 * @param string $translation Translated text.
	 * @param string $single      The text to be used if the number is singular.
	 * @param string $plural      The text to be used if the number is plural.
	 * @param string $number      The number to compare against to use either the singular or plural form.
	 * @param string $domain      Text domain. Unique identifier for retrieving translated strings.
	 */
	return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
}

/**
 * Translates and retrieves the singular or plural form based on the supplied number, with gettext context.
 *
 * This is a hybrid of _n() and _x(). It supports context and plurals.
 *
 * Used when you want to use the appropriate form of a string with context based on whether a
 * number is singular or plural.
 *
 * Example of a generic phrase which is disambiguated via the context parameter:
 *
 *     printf( _nx( '%s group', '%s groups', $people, 'group of people', 'text-domain' ), number_format_i18n( $people ) );
 *     printf( _nx( '%s group', '%s groups', $animals, 'group of animals', 'text-domain' ), number_format_i18n( $animals ) );
 *
...