return $this->mConverter->getConvRuleTitle();
}
+ /**
+ * Get the compiled plural rules for the language
+ * @since 1.20
+ * @return array Associative array with plural form, and plural rule as key-value pairs
+ */
+ public function getCompiledPluralRules() {
+ return self::$dataCache->getItem( strtolower( $this->mCode ), 'compiledPluralRules' );
+ }
+
/**
* Get the plural rules for the language
* @since 1.20
* @return int The index of the plural form
*/
private function getPluralForm( $number ) {
- $pluralRules = $this->getPluralRules();
- $form = CLDRPluralRuleEvaluator::evaluate( $number, $pluralRules );
+ $pluralRules = $this->getCompiledPluralRules();
+ $form = CLDRPluralRuleEvaluator::evaluateCompiled( $number, $pluralRules );
return $form;
}