/// <summary>Constructs a new service.</summary> /// <param name="initializer">The service initializer.</param> public TranslateService(Google.Apis.Services.BaseClientService.Initializer initializer) : base(initializer) { detections = new DetectionsResource(this); languages = new LanguagesResource(this); translations = new TranslationsResource(this); }
/// <summary> /// Constructs an instance from an API result. /// </summary> internal TranslationResult(TranslationsResource resource, string originalText, string specifiedSourceLanguage, string targetLanguage) : this(originalText, resource.TranslatedText, resource.DetectedSourceLanguage, specifiedSourceLanguage, targetLanguage, TranslationModels.GetModel(resource.Model)) { }