View Source Gettext.Interpolation behaviour (gettext v0.20.0)

Behaviour to provide Gettext String Interpolation.

Link to this section Summary

Link to this section Types

@type translation_type() :: :translation | :plural_translation

Link to this section Callbacks

Link to this macrocallback

compile_interpolate( translation_type, message, bindings )

View Source
@macrocallback compile_interpolate(
  translation_type :: translation_type(),
  message :: String.t(),
  bindings :: map()
) :: Macro.t()
@callback message_format() :: String.t()

Defines the gettext message format

Link to this callback

runtime_interpolate(message, bindings)

View Source
@callback runtime_interpolate(message :: String.t(), bindings :: map()) ::
  {:ok, String.t()}
  | {:mssing_bindings, message :: String.t(), missing_bindings :: [atom()]}