NOOP_Translations::select_plural_form() WordPress Method
The NOOP_Translations::select_plural_form() WordPress method is used to select the appropriate form of a plural string, based on the number of items. This method is used when the number of items is known and the correct form of the plural string needs to be selected. For example, if the string is "There are %d comments", and the number of comments is 1, the string "There is 1 comment" would be returned. If the number of comments is 2, the string "There are 2 comments" would be returned. This method is part of the WordPress Translation API and is used by the WordPress core to translate strings.
NOOP_Translations::select_plural_form( int $count ) #
Contents
Parameters
- $count
(int)(Required)
Return
(bool)
Source
File: wp-includes/pomo/translations.php
public function select_plural_form( $count ) { return 1 == $count ? 0 : 1; }
Expand full source codeCollapse full source codeView on TracView on GitHub