ngettext filter-hook . WP 2.2.0
Filters the singular or plural form of a string.
Usage
add_filter( 'ngettext', 'filter_function_name_9981', 10, 5 ); function filter_function_name_9981( $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.
Changelog
Since 2.2.0 | Introduced. |
Where the hook is called
ngettext
wp-includes/l10n.php 481
$translation = apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );