Forum: Ruby on Rails Initializers and I18n

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
89e57a28dfdb85e07b33f92783dbe349?d=identicon&s=25 Daniel Lopes (Guest)
on 2009-03-20 02:09
(Received via mailing list)
Hello,

My project have strange behavior diferent than I expected.

If I place a line like below after the Rails::Initializer block from
my enviroment file it will work fine:

PROJECT_NAME = I18n.t("settings.name")

But If I move this to a initializer file it will get the translation
error:

"translation missing: xxx, xxx xxxx"

I'm sure this is happening because the order of Rails load the
framework, initializers and then locale.

But somebody know if is possible to puts this in initializer and make
that kind of constant assignments after Rails load the locale?

I'm thinking in include a module after Rails::Initializer.run but for
that kind of thing need to be in a initializer file.
89e57a28dfdb85e07b33f92783dbe349?d=identicon&s=25 Daniel Lopes (Guest)
on 2009-03-20 16:08
(Received via mailing list)
somebody?
This topic is locked and can not be replied to.