ice framework documentation ice doc v1.11.0
  1. namespace Ice\I18n\Plural;
  2.  
  3. /**
  4. * Plural rules for the following locales and languages:
  5. *
  6. * Locales: ff fr kab
  7. *
  8. * Rules:
  9. * one → n within 0..2 and n is not 2;
  10. * other → everything else
  11. *
  12. * Reference CLDR Version 21 (2012-03-01 03:27:30 GMT)
  13. * @see http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
  14. * @see http://unicode.org/repos/cldr/trunk/common/supplemental/plurals.xml
  15. *
  16. * @package Ice/I18n
  17. * @category Plural rules
  18. * @author Ice Team
  19. * @copyright (c) 2014-2025 Ice Team
  20. * @license http://iceframework.org/license
  21. */
  22. class French implements PluralInterface
  23. {
  24. public function getCategory(int count) -> string
  25. {
  26. if count >= 0 && count < 2 {
  27. return "one";
  28. } else {
  29. return "other";
  30. }
  31. }
  32. }