Pluralization Rails 2.2 style
Railscast episode 132 talks about using helpers outside views. All in all a good and useful screencast. I only have one comment: In Rails 2.2 internationalized pluralization goes like this:
I18n.t(:people, :count => @people.size)
With these translation-files:
en:
people:
one: "one person"
other: "%{count} people"
nl:
people:
one: "een persoon"
other: "%{count} personen"
-
Peter
-
Peter
-
http://iain.nl Iain Hecker
-
http://iain.nl Iain Hecker
-
http://rubyreddo.com/ Dmitry
-
http://rubyreddo.com/ Dmitry
-
http://rubyreddo.com/ Dmitry
-
http://rubyreddo.com/ Dmitry
-
http://iain.nl Iain Hecker
-
http://iain.nl Iain Hecker
-
http://rubyreddo.com/ Dmitry
-
http://rubyreddo.com/ Dmitry
-
Dmitry
-
Dmitry
-
http://iain.nl Iain Hecker
-
http://iain.nl Iain Hecker