クラス Gettext_Translations::nplurals_and_expression_from_header()
目次
クラス Gettext_Translations::nplurals_and_expression_from_header()
定義ファイル :/blog/wp-includes/pomo/translations.php
1 2 3 4 5 6 7 8 9 | function nplurals_and_expression_from_header($header) { if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { $nplurals = (int)$matches[1]; $expression = trim($this->parenthesize_plural_exression($matches[2])); return array($nplurals, $expression); } else { return array(2, 'n != 1'); } } |