5 * Namespace for CLDR-related utility methods.
12 * Get the plural form index for the number.
14 * In case none of the rules passed, we return `pluralRules.length` -
15 * that means it is the "other" form.
17 * @param {number} number
18 * @param {Array} pluralRules
19 * @return {number} plural form index
21 getPluralForm: function ( number, pluralRules ) {
23 for ( i = 0; i < pluralRules.length; i++ ) {
24 if ( mw.libs.pluralRuleParser( pluralRules[ i ], number ) ) {