Hi, I'm following this guide http://guides.rubyonrails.org/i18n.html but I can't make it works. it says: "Rails adds all .rb and .yml files from the config/locales directory to your translations load path, automatically. The default en.yml locale in this directory contains a sample pair of translation strings" firstly when I create a rails app using the rails command it doesn't not create nether a config/locales directory nor en.yml file. secondly I want to change default language, I added this line to enviroment.rb as the guide says config.i18n.default_locale = :en but it gives me an error: undefined method `i18n' for #<Rails::Configuration:0xb78ac64c> Please I need a hand with this.
on 2010-01-22 07:28
on 2010-01-22 07:40
On Fri, Jan 22, 2010 at 01:19, Omar Rodriguez <omarjavier15@gmail.com> wrote: > firstly when I create a rails app using the rails command it doesn't > not create nether a config/locales directory nor en.yml file. I just tried generating a new Rails app with Rails 2.3.5. I got a config/locales/en.yml file. > secondly I want to change default language, I added this line to > enviroment.rb as the guide says > > config.i18n.default_locale = :en > > but it gives me an error: undefined method `i18n' for > #<Rails::Configuration:0xb78ac64c> Works fine for me. What Rails version are you using? Does the top if yopur environment.rb file say # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION ?
on 2010-01-30 23:01
mine says: RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION this should be the problem, aparrently rails command used without version argument uses 2.1.0 as default. Thanks a lot Henrik!
on 2010-02-01 16:32
I still have problems, I did gem update, then gem list looks like this: $ gem list *** LOCAL GEMS *** ... rails (2.3.5, 2.3.4) ... Despite it, when a do rails project-name, the config/enviroment.rb has RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION. I have netbeans6.8 installed, I don't know if it has its own version of rails and in somehow is replacing 2.3.5 ... Thanks
on 2010-02-01 16:38
Your top enviroment.rb says this: RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION. Should say this: RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION. Change it. 2010/2/1 Omar Rodriguez <omarjavier15@gmail.com> > ... > On Jan 31, 11:08 pm, Justin MacCarthy <jus...@maccarthy.org> wrote: > > > this should be the problem, aparrently rails command used without > > >> I just tried generating a new Rails app with Rails 2.3.5. I got a > > >> Works fine for me. What Rails version are you using? Does the top if > Groups "rails-i18n" group. > You received this message because you are subscribed to the Google Groups > "rails-i18n" group. > To post to this group, send email to rails-i18n@googlegroups.com. > To unsubscribe from this group, send email to > rails-i18n+unsubscribe@googlegroups.com<rails-i18n%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rails-i18n?hl=en. > > -- Experiencia es lo que obtienes, cuando no obtienes lo que quieres.
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.