Contains all of the internationalization (i18n)
information that WillPaginate::LinkRender uses.
Each of several strings can be customized. Each string has
a default value that can be overridden on a site-wide or
page-specific basis. (NB: page-specific translations won't work
for inline templates; only for the more typical views.)
Previous
- Default: "« Previous" (an HTML left-angle-quote and 'Previous')
- Site-wide key: "will_paginate.previous_label"
- Page-specific key: "#controller.#view.will_paginate.previous_label"
Next
- Default: "Next »" ('Next' and an HTML right-angle-quote)
- Site-wide key: "will_paginate.next_label"
- Page-specific key: "#controller.#view.will_paginate.next_label"
Gap Marker
- Default: "…" (an HTML ellipsis wrapped in a span)
- Site-wide key: "will_paginate.gap_marker"
- Page-specific key: "#controller.#view.will_paginate.gap_marker"
Entry Name
Used when the type of paginated object cannot be otherwise determined.
- Default: "entry"
- Site-wide key: "will_paginate.entry_name"
- Page-specific key: "#controller.#view.will_paginate.entry_name"
Page entries info (zero elements)
- Default: "No {pluralized_entry_name} found"
- Site-wide key: "will_paginate.page_entries_info.zero"
- Page-specific key: "#controller.#view.will_paginate.page_entries_info.zero"
- Interpolation options: "pluralized_entry_name"
==== Page entries info (one element)
- Default: "Displaying 1 {entry_name}"
- Site-wide key: "will_paginate.page_entries_info.one"
- Page-specific key: "#controller.#view.will_paginate.page_entries_info.one"
- Interpolation options: "entry_name"
==== Page entries info (one page of elements)
- Default: "Displaying all #total_count {pluralized_entry_name}"
- Site-wide key: "will_paginate.page_entries_info.all"
- Page-specific key: "#controller.#view.will_paginate.page_entries_info.all"
- Interpolation options: "pluralized_entry_name", "total_count"
==== Page entries info (n-m of x elements)
- Default: "Displaying {pluralized_entry_name} {start_count} - {end_count} of {total_count} in total"
- Site-wide key: "will_paginate.page_entries_info.n_to_m_of_x"
- Page-specific key: "#controller.#view.will_paginate.page_entries_info.n_to_m_of_x"
- Interpolation options: "pluralized_entry_name", "start_count", "end_count", "total_count"
Example: set some site-wide values and page-specific overrides for blog posts:
# in RAILS_ROOT/config/locales/en.yml:
en:
will_paginate:
previous_label: "<-- Previous"
next_label: "Next -->"
gap_marker: " - "
page_entries_info:
one: "One {{entry_name}} found:"
all: "All {{pluralized_entry_name}}:"
n_to_m_of_x: "{{pluralized_entry_name}} {{start_count}} to {{end_count}} of {{total_count}}:"
posts:
index:
will_paginate:
previous_label: "<-- Earlier"
next_label: "Later -->"