Created
December 27, 2017 09:11
-
-
Save edouard/e15a951a3477f9a07f851889b7b15e85 to your computer and use it in GitHub Desktop.
Create a translation on WebTranslateIt using the create Translation endpoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "net/http" | |
require "json" | |
http = Net::HTTP.new("webtranslateit.com", 443) | |
http.use_ssl = true | |
request = Net::HTTP::Post.new("/api/projects/proj_pvt_wL2h87YRMpKLXa8OYdnXAw/strings/15452121/locales/en/translations", {"Content-Type" => "application/json" }) | |
request.body = { "text" => { "one" => "one text", "other" => "other text"} }.to_json | |
response = http.request(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment