# `Cldr.Gettext.Plural`
[🔗](https://github.com/elixir-cldr/cldr/blob/v2.47.3/lib/cldr/gettext/plural.ex#L1)

Implements a macro to define a CLDR-based Gettext plural
module

[gettext](https://hexdocs.pm/gettext) allows for user-defined
[plural forms](https://hexdocs.pm/gettext/Gettext.Plural.html#content) modules
to be configured for a [gettext backend](https://hexdocs.pm/gettext/Gettext.Backend.html#content).

To define a plural forms module that uses [CLDR plural rules](https://cldr.unicode.org/index/cldr-spec/plural-rules)
create a new module and then `use Cldr.Gettext.Plural`. For example:

    defmodule MyApp.Gettext.Plural do
      use Cldr.Gettext.Plural, cldr_backend: MyApp.Cldr

    end

This module can then be used in the configuration of a `gettext` backend.
For example:

    defmodule MyApp.Gettext do
      use Gettext, plural_forms: MyApp.Gettext.Plural

    end

# `__using__`
*macro* 

Configure a module to be a [gettext plural](https://hexdocs.pm/gettext/Gettext.Plural.html#content)
module.

A CLDR-based `gettext` plural module is defined by including `use Cldr.Gettext.Plural`
as in this example:

    defmodule MyApp.Gettext.Plural do
      use Cldr.Gettext.Plural, cldr_backend: MyApp.Cldr

    end

## Arguments

* `options` is a keyword list of options. The default is `[]`

## Options

* `:cldr_backend` is any CLDR [backend](https://hexdocs.pm/ex_cldr/readme.html#backend-module-configuration)
  module. The default is `Cldr.default_backend!/0`.

---

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