Class PluralRules
Utility class used to determine the plural number to be used for a variable base on the locale
Method Detail
calculatesource public static
calculate( string $locale , integer|float $n )
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.
Link
http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.htmlhttps://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
Properties summary
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/class-Cake.I18n.PluralRules.html