2. Bing Translator API example
==============================================
source :
source :
package kr; import com.memetix.mst.language.Language; import com.memetix.mst.translate.Translate; public class bingTranslator { public static void main(String[] args){ Translate.setClientId("ask_translate"); Translate.setClientSecret("NUCNUsi0NR50g4rMsvx0s3+YEECKvIAU"); String str = "반가워"; try { String result = Translate.execute(str, Language.KOREAN, Language.ENGLISH); System.out.println("from : "+ str+" -> to : "+ result); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } }
Bing Translator API register URL : http://ask39.blogspot.kr/2015/11/1-bing-translator-api-register.html 에서 ClientId와 ClientSeret 받았다면 jar파일을 받아야함. Jar URL : https://code.google.com/p/microsoft-translator-java-api/