Skip to content

Instantly share code, notes, and snippets.

@edouard
Created June 12, 2017 16:37
Show Gist options
  • Save edouard/66ffef00e4ea4ba2218320aa04611619 to your computer and use it in GitHub Desktop.
Save edouard/66ffef00e4ea4ba2218320aa04611619 to your computer and use it in GitHub Desktop.
# before using: gem install web_translate_it
require "web_translate_it"
api_key = "your_api_key"
WebTranslateIt::Connection.new(api_key) do
WebTranslateIt::String.find_all({ key: "key_name" }).each do |string|
puts "key: #{string.key}"
puts "FR value: #{string.translation_for("fr")}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment