#
I18n Extra
Use the i18n
standard gem for the translations of the pagy strings.
It delegates translations and localization of the calendar time labels to the i18n
gem (which
should obviously be installed).
A change in the global I18n.locale
will automatically translate and localize all Pagy output accordingly.
Prefer Pagy i18n
You should have some very good reasons to use the i18n
gem instead of the pagy implementation, because the i18n
gem is ~18x
slower and uses ~10x more memory than the Pagy::I18n default implementation.
Having the i18n
gem already installed and configured in your app might not count as a good reason, because, besides being faster
and lighter, the Pagy::I18n is super easy to configure and doesn't require any change in the i18n
of the rest
of your app.
#
Synopsis
pagy.rb (initializer)
require 'pagy/extras/i18n'