Jump to content

Translate a "1 to 10 of 50" string (TO, OF)?


Roych
 Share

Recommended Posts

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

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 ?

  1. Setup -> Languages -> Your Language
  2. Find Files To Translate
  3. Look for \core\PaginatedArray.php under  Translatable files in /wire/
  4. Select #3
  5. Click Submit
  6. Translate!

translate_pagination_string.thumb.png.f94ce360ab045a1440b07a7a7f8846c3.png

Edited by kongondo
  • Like 5
Link to comment
Share on other sites

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 ?

  1. Setup -> Languages -> Your Language
  2. Find Files To Translate
  3. Look for \core\PaginatedArray.php under  Translatable files in /wire/
  4. Select #3
  5. Click Submit
  6. Translate!

translate_pagination_string.thumb.png.f94ce360ab045a1440b07a7a7f8846c3.png

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...