예제 #1
0
        private void TranslateContentFinish(bool success, string body)
        {
            ResultTranslate result = new ResultTranslate();

            result.success = success;
            JSONNode node = JSONNode.Parse(body);

            result.id             = node["id"].AsInt;
            result.translateReult = node["translatedText"].Value;
            translateContentListener(result);
        }
예제 #2
0
 private static void translate()
 {
     using (ITranslate translate = new TargomanTranslate())
     {
         ResultTranslate result = translate.Translate(new InputTranslate {
             Input = "hello ali"
         });
         string res = result.Result;
         w(res);
     }
 }