Class PluralRules
Utility class used to determine the plural number to be used for a variable base on the locale
        
    Namespace: Cake\I18n
    
    
    
      
  
      Property Summary
- 
        $_rulesMap protected staticarrayA map of locale => plurals group used to determine which plural rules apply to the language 
Method Summary
- 
          calculate() public staticReturns the plural form number for the passed locale corresponding to the countable provided in $n. 
Method Detail
calculate() ¶ public static
calculate(string $locale, int|float $n): intReturns 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. 
- 
                int|float$n
- The number to apply the rules to. 
Returns
intThe plural rule number that should be used.
Links
                          http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
                      
              https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules
Property Detail
$_rulesMap ¶ protected static
A map of locale => plurals group used to determine which plural rules apply to the language
Type
array