WordPress开发者和主题制作者的搜索引擎



_nc ›

Since2.7.0
已弃用2.9.0
_nc ( $single, $plural, $number, $domain = 'default' )
参数: (4)
  • (string) $single The text to be used if the number is singular.
    Required: Yes
  • (string) $plural The text to be used if the number is plural.
    Required: Yes
  • (int) $number The number to compare against to use either the singular or plural form.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    默认: 'default'
查看:
返回:
  • (string) The translated singular or plural form.
定义在:
文档:

Legacy version of _n(), which supports contexts.

Strips everything from the translation after the last bar.



Related Functions: _n, _c, _nx, _

源码

function _nc( $single, $plural, $number, $domain = 'default' ) {
	_deprecated_function( __FUNCTION__, '2.9.0', '_nx()' );
	return before_last_bar( _n( $single, $plural, $number, $domain ) );
}