/// <summary> /// Open a new translation project /// </summary> /// <param name="sourceLanguage">See Language Codes</param> /// <param name="targetLanguage">See Language Codes</param> /// <param name="sources">Comma separated list of Resource UUIDs</param> /// <param name="expertise">[Optional] See Expertise Codes</param> /// <param name="wordcount">[Optional] If empty use automatic counting</param> /// <param name="notes">[Optional] Text note that will be shown to translator regarding the newly project</param> /// <param name="callbackUrl">[Optional] See Callbacks section</param> /// <param name="name">[Optional] Name your project. If empty, your project will be named automatically.</param> /// <returns></returns> public CreateTranslationProjectResult CreateTranslationProject(string sourceLanguage, string targetLanguage , string sources, string expertise, string wordcount = "", string notes = "", string callbackUrl = "", string name = "") { var r = new CreateTranslationProjectResult(); try { if (CreateTranslationProjectProvider == null) { CreateTranslationProjectProvider = new CreateTranslationProjectProvider(); } var json = CreateTranslationProjectProvider.Get(Url, _proxy, KeyPublic, KeySecret, sourceLanguage, targetLanguage, sources, expertise, wordcount, notes, callbackUrl, name); r = JsonConvert.DeserializeObject <CreateTranslationProjectResult>(json.Replace("\"results\":[", "\"resultsArray\":[")); } catch (Exception err) { r.Status.Code = -1; r.Status.Msg = err.Message; } return(r); }
/// <summary> /// Open a new translation project /// </summary> /// <param name="sourceLanguage">See Language Codes</param> /// <param name="targetLanguage">See Language Codes</param> /// <param name="sources">Comma separated list of Resource UUIDs</param> /// <param name="expertise">[Optional] See Expertise Codes</param> /// <param name="wordcount">[Optional] If empty use automatic counting</param> /// <param name="notes">[Optional] Text note that will be shown to translator regarding the newly project</param> /// <param name="callbackUrl">[Optional] See Callbacks section</param> /// <param name="name">[Optional] Name your project. If empty, your project will be named automatically.</param> /// <returns></returns> public CreateTranslationProjectResult CreateTranslationProject(string sourceLanguage, string targetLanguage , string sources, string expertise, string wordcount = "", string notes = "", string callbackUrl = "", string name = "") { var r = new CreateTranslationProjectResult(); try { if (CreateTranslationProjectProvider == null) CreateTranslationProjectProvider = new CreateTranslationProjectProvider(); var json = CreateTranslationProjectProvider.Get(Url, _proxy, KeyPublic, KeySecret, sourceLanguage, targetLanguage, sources, expertise, wordcount, notes, callbackUrl, name); r = JsonConvert.DeserializeObject<CreateTranslationProjectResult>(json.Replace("\"results\":[", "\"resultsArray\":[")); } catch (Exception err) { r.Status.Code = -1; r.Status.Msg = err.Message; } return r; }