#18 new
Mihai Târnovan

default_locale is useless

Reported by Mihai Târnovan | August 16th, 2009 @ 02:34 PM

I think the intended usage for this method was to be used in an initializer to provide a default locale different from @@default_locale (:en). However, if some code calls I18n.translate before your initializer runs (for me this was happening in authlogic when it configured error messages for email validation), the locale will be set to :en and your call to default_locale in the initializer will be useless, as the locale was already set to @@default_locale. The workaround for this would be simply to use I18n.locale instead of I18n.default_locale in your initializer.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Internationalization API for Ruby.

This library is used in Ruby on Rails but also suited for use in other contexts.

People watching this ticket