translate_nooped_plural()WP 3.1.0

Translates and retrieves the singular or plural form of a string that's been registered with _n_noop() or _nx_noop().

Used when you want to use a translatable plural string once the number is known.


$message = _n_noop( '%s post', '%s posts', 'text-domain' );
printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );

No Hooks.


String. Either $single or $plural translated text.


translate_nooped_plural( $nooped_plural, $count, $domain );
$nooped_plural(array) (required)
Array with singular, plural, and context keys, usually the result of _n_noop() or _nx_noop().
$count(int) (required)
Number of objects.
Text domain. Unique identifier for retrieving translated strings. If $nooped_plural contains a text domain passed to _n_noop() or _nx_noop(), it will override this value.
Default: 'default'


Since 3.1.0 Introduced.

Code of translate_nooped_plural() WP 6.0

function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) {
	if ( $nooped_plural['domain'] ) {
		$domain = $nooped_plural['domain'];

	if ( $nooped_plural['context'] ) {
		return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain );
	} else {
		return _n( $nooped_plural['singular'], $nooped_plural['plural'], $count, $domain );