def bindtextdomain(domainname, options = {}, locale = nil, charset = nil, with_model = true)
opt = {:with_helper => true, :with_model => true}
if options.kind_of? CGI
opt.merge!(:cgi => options, :locale => locale, :charset => charset, :with_model => with_model)
else
opt.merge!(options)
end
opt[:path] ||= File.join(RAILS_ROOT, "locale")
Locale.set_current(nil)
set_cgi(opt[:cgi]) if opt[:cgi]
ret = _bindtextdomain(domainname, opt)
bindtextdomain_to(ActiveRecord::Base, domainname) if opt[:with_model]
bindtextdomain_to(ApplicationHelper, domainname) if opt[:with_helper]
ret
end