Rails 2.3.9 i18n - multiple yml files


Have been following the i18n guide (

Things are working in a basic way, using the simple backend, with my
en.yml and pt.yml locale files.

I got the core Rails Portuguese localisation from the rails-i18n
project on github.

In order to get it being used I had to copy into my pt.yml file.

However this seems to cause a clash my model specific activerecord
items - they are in the file before the defaults and so when it loads,
when it loads the standard activerecord: errors bit, it loses mine.

Fine, sounds like perhaps I should put things in separate files,

But when I put them in separate files, eg config/locales/defaults/
pt.yml - for the rails-i18n file and config/locales/pt.yml for app
specific translations. Also adding this line to environment.rb:

config.i18n.load_path += Dir[Rails.root.join(‘config’, ‘locales’,
‘**’, ‘*.{rb,yml}’)]

It does not find the defaults file - I get the Symbol not found error
(due to a date lookup, missing the localised date items…)

I looked at the i18n demo app ( http://github.com/clemens/i18n_demo_app
), but thats a bit old now and does not use nested/merged localisation

Any thoughts on where I am going wrong?

Thanks in advance,

Can you show us a Gist or pastie.org with your .yml files?


Sure - here is a sample app that has what I am trying to do in it:


But that works… doh!

Guess I need to look at my main app again.

Apologies for wasting your time,