Localisation #54

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
1 participant

In my project, I'm using enumerated_attribute, but I need to display the options in the right language.
I added a new options ":localize", and if it's set to true, then the labels are translated.
Example:

enum_attr :currency, %w(en ja), :init => I18n.locale, :localize => true do 
  label :en => "dollar"
  label :ja => "yen"
end

Then if the website is in Japanese I will see 円 and if it is in English I will see ¥.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment