クラス Translations::select_plural_form()
クラス Translations::select_plural_form()
定義ファイル :/blog/wp-includes/pomo/translations.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /** * 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 overrided by the sub-classes. For example MO/PO can derive the logic * from their headers. * * @param integer $count number of items */ function select_plural_form($count) { return 1 == $count? 0 : 1; } |