#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

  • MaeKowalski

    MaeKowalski September 18th, 2020 @ 02:07 PM

    Electronic things have made our life very much easy to know. By my essaywriter.org, We can not even think about our life without electronic products. Like for example if you don't have a laptop then what will you do. As laptops and computers are also electronic products.

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

Pages