Ejemplo n.º 1
0
 public function index_for_number($number)
 {
     if (!isset($this->_index_for_number)) {
         $gettext = new Gettext_Translations();
         $expression = $gettext->parenthesize_plural_exression($this->plural_expression);
         $this->_index_for_number = $gettext->make_plural_form_function($this->nplurals, $expression);
     }
     $f = $this->_index_for_number;
     return $f($number);
 }
Ejemplo n.º 2
0
 function index_for_number($number)
 {
     if (!isset($this->_index_for_number)) {
         $expression = Gettext_Translations::parenthesize_plural_exression($this->plural_expression);
         $this->_index_for_number = Gettext_Translations::make_plural_form_function($this->nplurals, $expression);
     }
     $f = $this->_index_for_number;
     return $f($number);
 }