Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localisation #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Localisation #54

wants to merge 2 commits into from

Conversation

aklein-dex
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant