View Source Cldr.Gettext.Plural (Cldr v2.40.1)
Implements a macro to define a CLDR-based Gettext plural module
gettext allows for user-defined plural forms modules to be configured for a gettext backend.
To define a plural forms module that uses CLDR 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
endThis 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
endSummary
Functions
Configure a module to be a gettext plural module.
Functions
Configure a module to be a gettext plural 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
endArguments
- optionsis a keyword list of options. The default is- []
Options
- :cldr_backendis any CLDR backend module. The default is- Cldr.default_backend!/0.