2 * CLDR related utility methods
9 * For the number, get the plural for index
10 * In case none of the rules passed, we return pluralRules.length
11 * That means it is the "other" form.
14 * @return plural form index
16 getPluralForm: function( number
, pluralRules
) {
17 var pluralFormIndex
= 0;
18 for ( pluralFormIndex
= 0; pluralFormIndex
< pluralRules
.length
; pluralFormIndex
++ ) {
19 if ( mw
.libs
.pluralRuleParser( pluralRules
[pluralFormIndex
], number
) ) {
23 return pluralFormIndex
;