Skip to content

Commit

Permalink
better description on how to add translations, lwe#7
Browse files Browse the repository at this point in the history
  • Loading branch information
lwe committed Jun 8, 2011
1 parent 350e380 commit f4315f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.rdoc
Expand Up @@ -141,6 +141,16 @@ useful when creating queries, displaying option elements or similar:

# or on the '_cd' field
<%= select("user", "gender_cd", User.genders_for_select(:value))

Translations need to be stored like:

de:
activerecord:
enums:
user: # the Model, as User.class.name.underscore
genders: # pluralized version of :gender
male: männlich
female: weiblich

* To define any option globally, like setting <tt>:whiny</tt> to +false+, or globally enable <tt>:prefix</tt>; all default options
are stored in <tt>SimpleEnum.default_options</tt>, this hash can be easily changed in your initializers or wherever:
Expand Down

0 comments on commit f4315f0

Please sign in to comment.