Author Topic: smart plurals instead of dumb plural(s)  (Read 4887 times)

0 Members and 1 Guest are viewing this topic.

Offline bryce

  • Pre-Newbie
  • Posts: 2
    • View Profile
smart plurals instead of dumb plural(s)
« on: December 11, 2002, 03:36:45 PM »
how do i modify the script so that the word displays properly according to the number of results?

for example:

Found: 2 images on 1 page.

instead of:
Found: 2 image(s) on 1 page(s).

also,
how do i not display the results sentence in the case where there are no results?

Found: 0 media on 0 page(s).

thanks,
bryce

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: smart plurals instead of dumb plural(s)
« Reply #1 on: December 11, 2002, 04:10:00 PM »
Quote from: bryce
for example:
Found: 2 images on 1 page
instead of:
Found: 2 image(s) on 1 page(s).

It's in lang/english/main.php
Code: [Select]
//-----------------------------------------------------
//--- Paging ------------------------------------------
//-----------------------------------------------------
$lang['paging_stats'] = "Found: {total_cat_images} image(s) on {total_pages} page(s). Displayed: image {first_page} to {last_page}.";

Any edit beyond that requires modifying the 4images php code directly.

Offline bryce

  • Pre-Newbie
  • Posts: 2
    • View Profile
smart plurals instead of dumb plural(s)
« Reply #2 on: December 11, 2002, 06:09:32 PM »
thanks, but my question is how to edit the php code directly.