Translate pagination labels
masterYou can translate pagination labels in two ways:
1. Inline in Twig
Use the trans filter within the knp_pagination_sortable function. You can pass translation parameters and specify a domain (e.g., messages).
2. Custom Translation Files
Create a translation file following the pattern domain.locale.format (e.g., KnpPaginatorBundle.tr.yaml) in your project's translations/ directory.
Common keys to override:
label_previouslabel_nextfilter_searchword
{# Inline translation example #}
<th>{{ knp_pagination_sortable(pagination, 'Author'|trans({}, 'messages'), 'a.author' )|raw }}</th># translations/KnpPaginatorBundle.tr.yaml
label_previous: "Önceki"
label_next: "Sonraki"
filter_searchword: "Arama kelimesi"