© 2017-2022 Domizio DemichelisMIT License

➡ Chat Support on Gitter ➡

I18n Extra

The i18n extra delegates the translation of the pagy strings 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 the Pagy output accordingly.

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.

Notice: 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.


See extras for general usage info.

In the pagy.rb initializer:

require 'pagy/extras/i18n'