gettext v0.11.0 Gettext.Backend behaviour
Behaviour that defines the macros that a Gettext backend has to implement.
These macros are documented in great detail in the documentation for the
Gettext
module.
Summary
Callbacks
Same as dgettext(domain, msgid, %{})
Translates the given msgid
in the given domain
Same as dngettext(domain, msgid, msgid_plural, n, %{})
Translates the given plural translation (msgid
+ msgid_plural
) in the
given domain
Same as gettext(msgid, %{})
Same as dgettext("default", msgid, %{})
Same as ngettext(msgid, msgid_plural, n, %{})
Same as dngettext("default", msgid, msgid_plural, n, bindings)
Callbacks
Specs
dgettext(env :: Macro.Env.t, domain :: Macro.t, msgid :: String.t) :: Macro.t
Same as dgettext(domain, msgid, %{})
.
See also Gettext.dgettext/4
.
Specs
dgettext(env :: Macro.Env.t, domain :: Macro.t, msgid :: String.t, bindings :: Macro.t) :: Macro.t
Translates the given msgid
in the given domain
.
bindings
is a map of bindings to support interpolation.
See also Gettext.dgettext/4
.
Specs
Same as dngettext(domain, msgid, msgid_plural, n, %{})
.
See also Gettext.dngettext/6
.
Specs
Translates the given plural translation (msgid
+ msgid_plural
) in the
given domain
.
n
is an integer used to determine how to pluralize the
translation. bindings
is a map of bindings to support interpolation.
See also Gettext.dngettext/6
.
Specs
gettext(env :: Macro.Env.t, msgid :: String.t) :: Macro.t
Same as gettext(msgid, %{})
.
See also Gettext.gettext/3
.
Specs
gettext(env :: Macro.Env.t, msgid :: String.t, bindings :: Macro.t) :: Macro.t
Same as dgettext("default", msgid, %{})
.
See also Gettext.gettext/3
.
Specs
ngettext(env :: Macro.Env.t, msgid :: String.t, msgid_plural :: String.t, n :: Macro.t) :: Macro.t
Same as ngettext(msgid, msgid_plural, n, %{})
.
See also Gettext.ngettext/5
.
Specs
Same as dngettext("default", msgid, msgid_plural, n, bindings)
.
See also Gettext.ngettext/5
.