Warning: This function has been deprecated. Use _n() instead.

__ngettext() WordPress Function

__ngettext() is a function in WordPress that allows you to create messages for translation that contain different forms based on a number. For example, you might use it to create a message like "1 comment" or "10 comments" depending on the number of comments a post has.

__ngettext( $args ) #

Retrieve the plural or single form based on the amount.


Description

Top ↑

See also


Top ↑

Source

File: wp-includes/deprecated.php

function __ngettext( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
	_deprecated_function( __FUNCTION__, '2.8.0', '_n()' );
	return _n( ...$args );
}


Top ↑

Changelog

Changelog
VersionDescription
2.8.0Use _n()
1.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More