Translations::select_plural_form() – Given the number of items, returns the 0-based index of the plural form to use
You appear to be a bot. Output may be restricted
Description
Given the number of items, returns the 0-based index of the plural form to use
Here, in the base Translations class, the common logic for English is implemented: 0 if there is one element, 1 otherwise This function should be overridden by the subclasses. For example MO/PO can derive the logic from their headers.
Usage
Translations::select_plural_form( $count );
Parameters
- $count
- ( int ) required – number of items
Returns
void
Source
File name: wordpress/wp-includes/pomo/translations.php
Lines:
1 to 4 of 4
public function select_plural_form( $count ) { return 1 === (int) $count ? 0 : 1; }