Hi, Have been following the i18n guide ( http://guides.rubyonrails.org/i18n.html ) 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, right? 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 dictionaries. Any thoughts on where I am going wrong? Thanks in advance, Chris
on 2010-09-27 23:01
on 2010-09-28 10:37
Hi, Sure - here is a sample app that has what I am trying to do in it: http://github.com/kimptoc/Rails-i18n-sample-with-m... But that works.. doh! Guess I need to look at my main app again. Apologies for wasting your time, Chris
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.