Roych Posted October 5, 2020 Share Posted October 5, 2020 I need to translate the a "1 to 10 of 50" string, TO and OF words, can this be done, if so where I looked everywhere? (I'm filtering like in skyscraper profile) Thank you R Link to comment Share on other sites More sharing options...
kongondo Posted October 5, 2020 Share Posted October 5, 2020 Try this: https://processwire.com/api/ref/paginated-array/get-pagination-string/ 1 Link to comment Share on other sites More sharing options...
eydun Posted October 5, 2020 Share Posted October 5, 2020 Quote I need to translate the a "1 to 10 of 50" string, TO and OF words, can this be done, if so where I looked everywhere? (I'm filtering like in skyscraper profile) I do not think it is possible to translate those words. Link to comment Share on other sites More sharing options...
Roych Posted October 6, 2020 Author Share Posted October 6, 2020 Oh, ok, to bad actualy ? Thank you R Link to comment Share on other sites More sharing options...
kongondo Posted October 6, 2020 Share Posted October 6, 2020 (edited) 13 hours ago, eydun said: I do not think it is possible to translate those words. Not true, actually. You can: See these lines, here and here: $str = sprintf($this->_('%1$s %2$d of %3$d'), $label, $pageNum, $totalPages); // Page quantity, i.e. Page 1 of 3 $str = sprintf($this->_('%1$s %2$d to %3$d of %4$d'), $label, $start, $end, $total); // Pagination item quantity, i.e. Items 1 to 10 of 50 1 hour ago, Roych said: Oh, ok, to bad actualy ? Thank you R Here's how to do it ? Setup -> Languages -> Your Language Find Files To Translate Look for \core\PaginatedArray.php under Translatable files in /wire/ Select #3 Click Submit Translate! Edited October 6, 2020 by kongondo 5 Link to comment Share on other sites More sharing options...
Roych Posted October 6, 2020 Author Share Posted October 6, 2020 22 minutes ago, kongondo said: Not true, actually. You can: See these lines, here and here: $str = sprintf($this->_('%1$s %2$d of %3$d'), $label, $pageNum, $totalPages); // Page quantity, i.e. Page 1 of 3 $str = sprintf($this->_('%1$s %2$d to %3$d of %4$d'), $label, $start, $end, $total); // Pagination item quantity, i.e. Items 1 to 10 of 50 Here's how to do it ? Setup -> Languages -> Your Language Find Files To Translate Look for \core\PaginatedArray.php under Translatable files in /wire/ Select #3 Click Submit Translate! Thank you Exactly what I needed ? I knew this can be done somehow cause PW is awesome when it comes to translating. ? R Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now