Pluralization with default_locale not working (Rails 4 Beta 1)

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs