# Initializers and I18n

**URL:** <https://www.ruby-forum.com/t/initializers-and-i18n/163415>\
**Category:** Rails\
**Created:** [March 20, 2009, 2:09am UTC](https://www.ruby-forum.com/t/initializers-and-i18n/163415 "2009-03-20T02:09:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liberte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@liberte](https://www.ruby-forum.com/u/liberte)\
**Post date:** [March 20, 2009, 2:09am UTC](https://www.ruby-forum.com/t/initializers-and-i18n/163415/1 "2009-03-20T02:09:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![liberte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@liberte](https://www.ruby-forum.com/u/liberte)\
**Post date:** [March 20, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/initializers-and-i18n/163415/2 "2009-03-20T16:08:35Z")

</div>

somebody?
