ngettext_with_context хук-фильтр . WP 2.8.0
Filters the singular or plural form of a string with gettext context.
Использование
add_filter( 'ngettext_with_context', 'filter_function_name_8314', 10, 6 ); function filter_function_name_8314( $translation, $single, $plural, $number, $context, $domain ){ // filter... return $translation; }
- $translation(строка)
- Translated text.
- $single(строка)
- The text to be used if the number is singular.
- $plural(строка)
- The text to be used if the number is plural.
- $number(строка)
- The number to compare against to use either the singular or plural form.
- $context(строка)
- Context information for the translators.
- $domain(строка)
- Text domain. Unique identifier for retrieving translated strings.
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
ngettext_with_context
wp-includes/l10n.php 541
$translation = apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );