クラス Translations::translate_plural()
クラス Translations::translate_plural()
定義ファイル :/blog/wp-includes/pomo/translations.php
1 2 3 4 5 6 7 8 9 10 11 12 | function translate_plural($singular, $plural, $count, $context = null) { $entry = new Translation_Entry(array('singular' => $singular, 'plural' => $plural, 'context' => $context)); $translated = $this->translate_entry($entry); $index = $this->select_plural_form($count); $total_plural_forms = $this->get_plural_forms_count(); if ($translated && 0 <= $index && $index < $total_plural_forms && is_array($translated->translations) && isset($translated->translations[$index])) return $translated->translations[$index]; else return 1 == $count? $singular : $plural; } |