Corex.Pagination.Translation (Corex v0.1.2)

View Source

Translatable strings for Corex.Pagination.

Pass translation={%Corex.Pagination.Translation{}} to override any field. Omitted fields use gettext defaults (see table).

FieldDefaultUsed for
root_labelPaginationRoot aria-label
prev_trigger_labelPrevious pagePrevious control
next_trigger_labelNext pageNext control
item_labelPage %{page} of %{total_pages}Page button aria-label (%{page}, %{total_pages} at runtime)

Partial override example:

translation={%Corex.Pagination.Translation{
  prev_trigger_label: Corex.Gettext.gettext("Previous page"),
  next_trigger_label: Corex.Gettext.gettext("Next page")
}}

Summary

Types

t()

@type t() :: %Corex.Pagination.Translation{
  item_label: String.t(),
  next_trigger_label: String.t(),
  prev_trigger_label: String.t(),
  root_label: String.t()
}

Functions

resolve(partial)

to_camel_map(t)