Hi,

I am just trying to setup an application in Rails 4, Beta 1. The 
application is (exclusively) in German Language and therefore also the URLs 
should be German. I want to create a controller and model for an entity 
called "Region"; Rails pluralizes that to "Regions", but it should be 
"Regionen". What I did is: in config/application.rb uncomment this line:

config.i18n.default_locale = :de

And in config/initializers/inflections.rb I put this:

ActiveSupport::Inflector.inflections(:de) do |inflect|
  inflect.irregular 'region', 'regionen'
end

But its not working... When I change the inflection to

inflect.irregular 'region', I18n.locale

and remove the (:de) I can see that the passed locale is :en and not :de. 
Why is my default locale not passed to this inflections?

Thanks

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/1wUnBxuaZNYJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to