# `Cldr.Number.PluralRule`
[🔗](https://github.com/elixir-cldr/cldr/blob/v2.47.3/lib/cldr/plural_rules/plural_rule.ex#L1)

Defines the plural rule implementation
modules. The functions in this module
generate code to implement the plural
rules of CLDR.

# `operand`

```elixir
@type operand() :: any()
```

# `plural_rule`

```elixir
@type plural_rule() :: Keyword.t()
```

Defines the structure of a plural rule before compilation.

# `plural_type`

```elixir
@type plural_type() :: :zero | :one | :two | :few | :many | :other
```

Defines the plural types into which a number can be categorised.

# `known_plural_types`

```elixir
@spec known_plural_types() :: [plural_type(), ...]
```

Returns a list of the possible pluralization
types

# `plural_type`

Returns the plural type for a given number.

## Arguments

* `number` is an integer, float or Decimal number.

* `backend` is any module that includes `use Cldr` and therefore
  is a `Cldr` backend module.  The default is `Cldr.default_backend!/0`.

* `options` is a keyword list of options.

## Options

* `locale` is any valid locale name returned by `Cldr.known_locale_names/1`
  or a `Cldr.LanguageTag` struct returned by `Cldr.Locale.new!/2`, The
  default is `Cldr.get_locale/0`.

* `backend` is any module that includes `use Cldr` and therefore
   is a `Cldr` backend module.  The default is `Cldr.default_backend!/0`.
   This option allows the backend to be specified as an argument or an option.

* `type` is either `Cardinal` or `Ordinal`. The default is `Cardinal`.

## Examples

  	iex> Cldr.Number.PluralRule.plural_type(123)
  	:other

  	iex> Cldr.Number.PluralRule.plural_type(123, type: Ordinal)
  	:few

  	iex> Cldr.Number.PluralRule.plural_type(123, type: Cardinal)
  	:other

  	iex> Cldr.Number.PluralRule.plural_type(2, locale: "de")
  	:other

---

*Consult [api-reference.md](api-reference.md) for complete listing*
