_n_noop() – Registers plural strings in POT file, but does not translate them.
You appear to be a bot. Output may be restricted
Description
Registers plural strings in POT file, but does not translate them.
Used when you want to keep structures with translatable plural strings and use them later when the number is known. Example:
- $message = _n_noop( '%s post', '%s posts', 'text-domain' );
- …
- printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
Usage
$array = _n_noop( $singular, $plural, $domain );
Parameters
- $singular
- ( string ) required – Singular form to be localized.
- $plural
- ( string ) required – Plural form to be localized.
- $domain
- ( string ) optional – Optional. Text domain. Unique identifier for retrieving translated strings. Default null.
- $0
- ( string ) optional – Singular form to be localized. No longer used.
- $1
- ( string ) optional – Plural form to be localized. No longer used.
- $singular
- ( string ) optional – Singular form to be localized.
- $plural
- ( string ) optional – Plural form to be localized.
- $context
- ( null ) optional – Context information for the translators.
- $domain
- ( string|null ) optional – Text domain. }
Returns
array { Array of translation information for the strings.
Source
File name: wordpress/wp-includes/l10n.php
Lines:
1 to 10 of 10
function _n_noop( $singular, $plural, $domain = null ) { return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null, 'domain' => $domain, ); }