On this page
_nc( string $single, string $plural, int $number, string $domain = 'default' ): string
This function has been deprecated. Use _nx() instead.
Legacy version of _n() , which supports contexts.
Description
Strips everything from the translation after the last bar.
See also
Parameters
$singlestring Required-
The text to be used if the number is singular.
$pluralstring Required-
The text to be used if the number is plural.
$numberint Required-
The number to compare against to use either the singular or plural form.
$domainstring Optional-
Text domain. Unique identifier for retrieving translated strings.
Default'default'.Default:
'default'
Return
string The translated singular or plural form.
Source
File: wp-includes/deprecated.php. View all references
function _nc( $single, $plural, $number, $domain = 'default' ) {
_deprecated_function( __FUNCTION__, '2.9.0', '_nx()' );
return before_last_bar( _n( $single, $plural, $number, $domain ) );
}
Related
Uses
| Uses | Description |
|---|---|
| before_last_bar() wp-includes/l10n.php | Removes last item on a pipe-delimited string. |
| _n() wp-includes/l10n.php | Translates and retrieves the singular or plural form based on the supplied number. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_nc