Hey, im trying desperately to load my norwegian translation file here.. I've set config.i18n.default_locale = :nb_NO which should load config/ locales/nb_NO.yml yeah? it just loads config/locales/en_US.yml. both locales are present in config/ and i can't see anything wrong with the nb_NO.yml syntax.. Thanks!
on 2010-06-07 22:18
on 2010-06-07 22:36
Hey,
Check in your `config/environments.rb` if you have something like:
config.i18n.load_path << Dir[File.join(Rails.root, 'config',
'locales', '*.{rb,yml}')]
Then rails should load all YAML files in `config/locales/*`.
Alternatively, do you have `nb_NO:` at the root of your norwegian YAML
file?
Regards,
Édouard
on 2010-06-08 02:14
By default Rails loads every .rb and .yml file in config/locales, so you shouldn't be setting the load path yourself. And you should use a dash instead of an underscore. Neither of these are solutions to your problem, but just check it to see if it's accurate. Iain On Mon, Jun 7, 2010 at 16:33, Jürgen Feßlmeier
on 2010-06-08 12:11
Thank y'all so much for the response fellas - my yml had nb_NO: at the root but needed "nb-NO": - and my environment.rb had config.i18n.default_locale = :nb_NO but needed config.i18n.default_locale = :"nb-NO". Hopefully I can buy y'all a beer sometime. Have a great day!
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.