It just won't load

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!

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

Try I18n.locale = :":nb-NO"

Kind regards,
Juergen

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

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!