Daniel Arnreich
2013-Mar-26 13:29 UTC
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 -- 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.