The basic scheme:
= will_paginate @products, :previous_label => t("previous_label"), :next_label => t("next_label")
de.yml
will_paginate:
page_gap: "…"
previous_label: "word for back"
next_label: "word for next"
en.yml
en:
will_paginate:
page_gap: “…”
previous_label: “previous”
next_label: “next”
But in the output are still the labels called Previous Label and Next Label.
What is still wrong? Also, I thought I didn’t restart the server… but after restart still the same labels, not my translations
You can grab YAML files translated in various languages for will_paginate here : https://github.com/tigrish/will-paginate-i18n.
In your example, you’re overriding the :previous_label and the :next_label, but you’re not scoping it to ‘will_paginate’.
Either remove the overrides completely and customise the labels in your translation file :
or scope the
.tcalls correctly :