Skip to content
Browse files

Add plural form example for AR I18n section [ci skip]

  • Loading branch information...
1 parent c7ac0a5 commit 23c5d6d9ad704e488e685c34e158255a7d3278f5 @sadjow sadjow committed Aug 13, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 guides/source/
13 guides/source/
@@ -731,6 +731,19 @@ en:
Then `User.model_name.human` will return "Dude" and `User.human_attribute_name("login")` will return "Handle".
+You can also set a plural form for model names, adding as following:
+ activerecord:
+ models:
+ user:
+ one: Dude
+ other: Dudes
+Then `User.model_name.human(:count => 2)` will return "Dudes". With `:count => 1` or without params will return "Dude".
#### Error Message Scopes
Active Record validation error messages can also be translated easily. Active Record gives you a couple of namespaces where you can place your message translations in order to provide different messages and translation for certain models, attributes, and/or validations. It also transparently takes single table inheritance into account.

0 comments on commit 23c5d6d

Please sign in to comment.
Something went wrong with that request. Please try again.