Hacker News new | ask | show | jobs
by joezydeco 4723 days ago
For every Starbucks messing up he/she/they, I can count 10 websites that can't get this right:

  printf("%d %s in your cart",x,(x==1) ? "item" : "items");

  0 items
  1 item 
  2 items
I could swear eBay printed "1 items" for the first decade of it's existence.
1 comments

you'll have to revisit that for localization, you could use ngettext or similar right away.
That's a whole level of difficulty above this, my friend.