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); }
private static void translate() { using (ITranslate translate = new TargomanTranslate()) { ResultTranslate result = translate.Translate(new InputTranslate { Input = "hello ali" }); string res = result.Result; w(res); } }