I have an application that uses I18n, but in the first deployment, I
don’t want to enable different languages per user/request because
there are very few users who all speak german).
Therefore I have config.i18n.default_locale = :de in config/
application.rb.
I have no code whatsoever to set/change I18n.locale in my app.
In development environment, it works as expected: the application is
in german:
$ rails c
Loading development environment (Rails 3.0.0.rc)
I18n.default_locale
=> :deI18n.locale
=> :de
But in production, the application is in english, although
default_locale is correctly set:
$ RAILS_ENV=production rails c
Loading production environment (Rails 3.0.0.rc)
I18n.default_locale
=> :deI18n.locale
=> :en
Does anyone have an idea what might cause this, or how to change?
I have a completely unchanged config/environments/production.rb, but I
also tested with
config.i18n.fallbacks = false
with no change.
Rainer
Some system information:
I18n gem is version 0.4.1. Ruby is:
ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
but it is exactly the same on 1.9.2 p0.
FWIW:
Mac OS X 10.6.4, although the language of my account is English, I get
the following:
$ locale
LANG=“de_DE.UTF-8”
LC_COLLATE=“de_DE.UTF-8”
LC_CTYPE=“de_DE.UTF-8”
LC_MESSAGES=“de_DE.UTF-8”
LC_MONETARY=“de_DE.UTF-8”
LC_NUMERIC=“de_DE.UTF-8”
LC_TIME=“de_DE.UTF-8”
LC_ALL=
But I get the same behavior on Debian 5, with LANG=en_US.UTF-8