`

google-api-translate-java

    博客分类:
  • J2EE
阅读更多
//  http://code.google.com/p/google-api-translate-java/



import com.google.api.translate.Language;
import com.google.api.translate.Translate;

public class Main {
  public static void main(String[] args) throws Exception {
    // Set the HTTP referrer to your website address.
    Translate.setHttpReferrer(/* Enter the URL of your site here */);

    String translatedText = Translate.execute("Bonjour le monde", Language.FRENCH, Language.ENGLISH);

    System.out.println(translatedText);
  }
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics