pluralLogic method

LocalisonPlural pluralLogic(
  1. num count,
  2. Locale locale,
  3. [int precision = 0]
)

Implements the logic for plural selection.

Implementation

static LocalisonPlural pluralLogic(num count, Locale locale,
    [int precision = 0]) {
  assert(null != count);
  assert(null != locale);

  startRuleEvaluation(count, precision);

  final localeToString = locale.toString();

  final pluralRuleFn = pluralRules.containsKey(localeToString)
      ? pluralRules[localeToString]
      : pluralRules['default'];

  return pluralRuleFn();
}