]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/globalize2/init.rb
Add Globalize2 so that we get some nice fall backs to other languages when a translat...
[rails.git] / vendor / plugins / globalize2 / init.rb
diff --git a/vendor/plugins/globalize2/init.rb b/vendor/plugins/globalize2/init.rb
new file mode 100644 (file)
index 0000000..7b5428e
--- /dev/null
@@ -0,0 +1,10 @@
+require 'rails_edge_load_path_patch.rb' unless I18n.respond_to?(:load_path)
+
+ActiveRecord::Base.send :include, Globalize::Model::ActiveRecord::Translated
+
+I18n.backend = Globalize::Backend::Static.new
+
+I18n.load_path = Globalize::LoadPath.new I18n.load_path
+I18n.load_path << "#{File.dirname(__FILE__)}/lib/locale"
+I18n.load_path << "#{RAILS_ROOT}/lib/locale"
+