_n_noop

Registers plural strings in POT file, but does not translate them.

Description

(array) _n_noop( (string) $singular, (string) $plural, (null) $domain = null ); 

Used when you want to keep structures with translatable plural strings and use them later when the number is known.

Example:

Returns (array)

{ Array of translation information for the strings. @type string $0 Singular form to be localized. No longer used. @type string $1 Plural form to be localized. No longer used. @type string $singular Singular form to be localized. @type string $plural Plural form to be localized. @type null $context Context information for the translators. @type string $domain Text domain. }

Parameters (3)

0. $singular (string)
Singular form to be localized.
1. $plural (string)
Plural form to be localized.
2. $domain — Optional. (null) => null
Text domain. Unique identifier for retrieving translated strings. Default null.

Usage

  1. if ( !function_exists( '_n_noop' ) ) { 
  2. require_once ABSPATH . WPINC . '/l10n.php'; 
  3.  
  4. // Singular form to be localized. 
  5. $singular = ''; 
  6.  
  7. // Plural form to be localized. 
  8. $plural = ''; 
  9.  
  10. // Optional. Text domain. Unique identifier for retrieving translated strings. 
  11. // Default null. 
  12. $domain = null; 
  13.  
  14. // NOTICE! Understand what this does before running. 
  15. $result = _n_noop($singular, $plural, $domain); 
  16.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/l10n.php  
  1. function _n_noop( $singular, $plural, $domain = null ) { 
  2. return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null, 'domain' => $domain );