The i18n is configured in the rails 3.0.3 project :
config.i18n.default_locale = :fr
In my dev environnement, everything works fine with price in € and text (like next previous from will_paginate) correctly displayed.
In production environnement, everything is in english and in $.
Where can i found the problem of my i18n ?
What am I missing in i18n in production?
More Info:
On the production server in the rails console production :
irb(main):002:0> I18n.config.default_locale
=> :fr
2Nd Edit
Is there a way to display I18n properties or config in a debug or in a view?
I think this is related to this bug: http://groups.google.com/group/rubyonrails-core/browse_thread/thread/1fe3e88f9fe73177/ .
18n.locale is called before the config.i18n.default_locale is propagated to the I18n class.
I will try to also change it in config/initializers/locale.rb. According to 2.2 Optional: Custom I18n Configuration Setup in http://guides.rubyonrails.org/i18n.html, you should also change it in config/initializers/locale.rb . Hope this will fix it for you.
Resolved by adding config.i18n.locale = :fr
in addition of the default config.i18n.default_locale = :fr
in my application.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With