1

I am just trying to setup an application in Rails 4, Beta 1. The application in (exclusively) in German 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

Peter Brown
  • 50,956
  • 18
  • 113
  • 146
Daniel
  • 2,409
  • 2
  • 26
  • 42

1 Answers1

0

I don't know why this is the case (I have the same problem), but try also this:

config.i18n.locale = :de
Anonym
  • 1