\Cake\I18nPluralRules

Utility class used to determine the plural number to be used for a variable base on the locale

Summary

Methods
Properties
Constants
calculate()
No public properties found
No constants found
No protected methods found
$_rulesMap
N/A
No private methods found
No private properties found
N/A

Properties

$_rulesMap

$_rulesMap : array

A map of locale => plurals group used to determine which plural rules apply to the language

Type

array

Methods

calculate()

calculate(string  $locale, integer|float  $n) : integer

Returns the plural form number for the passed locale corresponding to the countable provided in $n.

Parameters

string $locale

The locale to get the rule calculated for.

integer|float $n

The number to apply the rules to.

Returns

integer —

The plural rule number that should be used.