# File lib/i18n-js.rb, line 119 def save(translations, file) file = Rails.root.join(file) FileUtils.mkdir_p File.dirname(file) File.open(file, "w+") do |f| f << %(var I18n = I18n || {};\n) f << %(I18n.translations = ); f << translations.to_json f << %(;) end end