Condividi tramite


DocumentTranslationClient.StartTranslation Method

Definition

Overloads

StartTranslation(WaitUntil, RequestContent, RequestContext)

[Protocol Method] Submit a document translation request to the Document Translation service

StartTranslation(DocumentTranslationInput, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslation(IEnumerable<DocumentTranslationInput>, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslation(WaitUntil, StartTranslationDetails, CancellationToken)

Submit a document translation request to the Document Translation service.

StartTranslation(WaitUntil, RequestContent, RequestContext)

Source:
DocumentTranslationClient.cs

[Protocol Method] Submit a document translation request to the Document Translation service

public virtual Azure.Operation StartTranslation (Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member StartTranslation : Azure.WaitUntil * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Operation
override this.StartTranslation : Azure.WaitUntil * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Operation
Public Overridable Function StartTranslation (waitUntil As WaitUntil, content As RequestContent, Optional context As RequestContext = Nothing) As Operation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Operation representing an asynchronous operation on the service.

Exceptions

content is null.

Service returned a non-success status code.

Applies to

StartTranslation(DocumentTranslationInput, CancellationToken)

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

public virtual Azure.AI.Translation.Document.DocumentTranslationOperation StartTranslation (Azure.AI.Translation.Document.DocumentTranslationInput input, System.Threading.CancellationToken cancellationToken = default);
abstract member StartTranslation : Azure.AI.Translation.Document.DocumentTranslationInput * System.Threading.CancellationToken -> Azure.AI.Translation.Document.DocumentTranslationOperation
override this.StartTranslation : Azure.AI.Translation.Document.DocumentTranslationInput * System.Threading.CancellationToken -> Azure.AI.Translation.Document.DocumentTranslationOperation
Public Overridable Function StartTranslation (input As DocumentTranslationInput, Optional cancellationToken As CancellationToken = Nothing) As DocumentTranslationOperation

Parameters

input
DocumentTranslationInput

Sets the input for the translation operation including source and target containers for documents to be translated.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Exceptions

Service returned a non-success status code.

Applies to

StartTranslation(IEnumerable<DocumentTranslationInput>, CancellationToken)

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

public virtual Azure.AI.Translation.Document.DocumentTranslationOperation StartTranslation (System.Collections.Generic.IEnumerable<Azure.AI.Translation.Document.DocumentTranslationInput> inputs, System.Threading.CancellationToken cancellationToken = default);
abstract member StartTranslation : seq<Azure.AI.Translation.Document.DocumentTranslationInput> * System.Threading.CancellationToken -> Azure.AI.Translation.Document.DocumentTranslationOperation
override this.StartTranslation : seq<Azure.AI.Translation.Document.DocumentTranslationInput> * System.Threading.CancellationToken -> Azure.AI.Translation.Document.DocumentTranslationOperation
Public Overridable Function StartTranslation (inputs As IEnumerable(Of DocumentTranslationInput), Optional cancellationToken As CancellationToken = Nothing) As DocumentTranslationOperation

Parameters

inputs
IEnumerable<DocumentTranslationInput>

Sets the inputs for the translation operation including source and target containers for documents to be translated.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Exceptions

Service returned a non-success status code.

Applies to

StartTranslation(WaitUntil, StartTranslationDetails, CancellationToken)

Source:
DocumentTranslationClient.cs

Submit a document translation request to the Document Translation service.

public virtual Azure.Operation StartTranslation (Azure.WaitUntil waitUntil, Azure.AI.Translation.Document.StartTranslationDetails startTranslationDetails, System.Threading.CancellationToken cancellationToken = default);
abstract member StartTranslation : Azure.WaitUntil * Azure.AI.Translation.Document.StartTranslationDetails * System.Threading.CancellationToken -> Azure.Operation
override this.StartTranslation : Azure.WaitUntil * Azure.AI.Translation.Document.StartTranslationDetails * System.Threading.CancellationToken -> Azure.Operation
Public Overridable Function StartTranslation (waitUntil As WaitUntil, startTranslationDetails As StartTranslationDetails, Optional cancellationToken As CancellationToken = Nothing) As Operation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

startTranslationDetails
StartTranslationDetails

Translation job submission batch request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

startTranslationDetails is null.

Remarks

Use this API to submit a bulk (batch) translation request to the Document Translation service. Each request can contain multiple documents and must contain a source and destination container for each document.

The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.

Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.

If the glossary is invalid or unreachable during translation, an error is indicated in the document status. If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.

Applies to