ngettext_{$domain}

FILTER wp-includes\l10n.php (ligne 513) github
Filters the singular or plural form of a string for a domain. The dynamic portion of the hook name, `$domain`, refers to the text domain.

Paramètres

Entrée :
$translation, $single, $plural, $number, $domain
Sortie :
@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 int    $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.

Utilisation

// Modifier la valeur avec le filtre 'ngettext_{$domain}'
add_filter('ngettext_{$domain}', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($translation) {
    // Modifier la valeur
    return $translation;
}

Actualités

Chargement des actualités...