Help HelpAPI

API

The sprawk translation engine can be called from any Internet-connected application or website. Below is an example of connecting via a Java application:

         // setup url
      String translationUrl = "http://www.sprawk.com/api/translate.jsp";
      String queryString = "groupCode=" + groupCode +
              "&password=" + password +
              "&text=" + URLEncoder.encode(text) +
              "&fromLang=" + codeFrom +
              "&toLang=" + codeTo +
              "&type=text";
      // do the web request
      HttpMethod method = new GetMethod(translationUrl);
      method.setQueryString(queryString);
      method.setFollowRedirects(true);
      method.setStrictMode(false);
      try {
        CLIENT.executeMethod(method);
        // trim to remove any leading/trailing newlines
        translation = method.getResponseBodyAsString().trim();
      } catch (IOException e) {
        LogHelper.log.error("Method error", e);
        translation = text;
      }

blog comments powered by Disqus

Call nowCall now

Feel free to contact us at any time to discuss your multilingual or translation project.

Ph. +46 70 885 9690 (Sweden)
Ph. +33 6 76 59 21 07 (France)
Skype. sprawk

Not registered?Not registered?

Try out our team features #free# for 30 days, no deposit or credit card required.

Freelance translator?Freelance translator?

Are you interested in working with us as a freelance translator?