Change PREVIOUS/NEXT anchor links value #705
-
Hi everyone, I hope you're all doing well! I'm currently working with Pagy Rails pagination and looking for a way to personalize the 'Previous' and 'Next' link text. I've tried a few approaches but haven't found a straightforward solution yet. When I use <%== pagy_nav( For example in my pagy.rb I tried all of these but unsuccessfully Pagy::DEFAULT[:link_prev] = { text: 'Custom Previous' } In my view I also tried <%== pagy_nav( Does anyone have suggestions or tips on how I can easily change the text for the 'Previous' and 'Next' links in Pagy pagination? Do I have to create custom pagination template, which would not be preferred? Your insights would be greatly appreciated! Thank you in advance for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I made it work by going to projects locales/en.yml and just adding:
To check all locales this link will be out of help https://github.com/ddnexus/pagy/blob/master/gem/locales/en.yml However, it would be dope if we could override it somehow per pagy instance or in pagy.rb (I'm new to Pagy; maybe it can; if you know, please let us newbies know too). Cheers 😃 |
Beta Was this translation helpful? Give feedback.
I made it work by going to projects locales/en.yml and just adding:
To check all locales this link will be out of help https://github.com/ddnexus/pagy/blob/master/gem/locales/en.yml
However, it would be dope if we could override it somehow per pagy instance or in pagy.rb (I'm new to Pagy; maybe it can; if you know, please let us newbies know too).
Cheers 😃