3 @@default_locale = :'en-US'
10 def load_path=(load_path)
11 @@load_path = load_path
16 I18n::Backend::Simple.module_eval do
18 @initialized ||= false
24 load_translations(*I18n.load_path)
28 def lookup(locale, key, scope = [])
30 init_translations unless initialized?
31 keys = I18n.send :normalize_translation_keys, locale, key, scope
32 keys.inject(translations){|result, k| result[k.to_sym] or return nil }
36 rails_dir = File.expand_path "#{File.dirname(__FILE__)}/../../../rails/"
37 paths = %w(actionpack/lib/action_view/locale/en-US.yml
38 activerecord/lib/active_record/locale/en-US.yml
39 activesupport/lib/active_support/locale/en-US.yml)
40 paths.each{|path| I18n.load_path << "#{rails_dir}/#{path}" }