Pluralization

suggest change

I18n can pluralize a translation when you pass count.

Set up the locale file like this. English uses one and other.

# config/locales/en.yml
en:
  online_users:
    one: "1 user is online"
    other: "%{count} users are online"

Pass count to I18n.t:

I18n.t("online_users", count: 1)
#=> "1 user is online"

I18n.t("online_users", count: 4)
#=> "4 users are online"

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents