AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Implementation for accessing Translate

Provides translation of the input content from the source language to the target language.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.Translate.AmazonTranslateClient

Namespace: Amazon.Translate
Assembly: AWSSDK.Translate.dll
Version: 3.x.y.z

Syntax

C#
public class AmazonTranslateClient : AmazonServiceClient
         IAmazonService, IAmazonTranslate, IDisposable

The AmazonTranslateClient type exposes the following members

Constructors

NameDescription
Public Method AmazonTranslateClient()

Constructs AmazonTranslateClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonTranslateClient(RegionEndpoint)

Constructs AmazonTranslateClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonTranslateClient(AmazonTranslateConfig)

Constructs AmazonTranslateClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonTranslateClient(AWSCredentials)

Constructs AmazonTranslateClient with AWS Credentials

Public Method AmazonTranslateClient(AWSCredentials, RegionEndpoint)

Constructs AmazonTranslateClient with AWS Credentials

Public Method AmazonTranslateClient(AWSCredentials, AmazonTranslateConfig)

Constructs AmazonTranslateClient with AWS Credentials and an AmazonTranslateClient Configuration object.

Public Method AmazonTranslateClient(string, string)

Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonTranslateClient(string, string, RegionEndpoint)

Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonTranslateClient(string, string, AmazonTranslateConfig)

Constructs AmazonTranslateClient with AWS Access Key ID, AWS Secret Key and an AmazonTranslateClient Configuration object.

Public Method AmazonTranslateClient(string, string, string)

Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonTranslateClient(string, string, string, RegionEndpoint)

Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonTranslateClient(string, string, string, AmazonTranslateConfig)

Constructs AmazonTranslateClient with AWS Access Key ID, AWS Secret Key and an AmazonTranslateClient Configuration object.

Properties

NameTypeDescription
Public Property Config Amazon.Runtime.IClientConfig Inherited from Amazon.Runtime.AmazonServiceClient.
Public Property Paginators Amazon.Translate.Model.ITranslatePaginatorFactory

Paginators for the service

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method CreateParallelData(CreateParallelDataRequest)

Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.

Public Method CreateParallelDataAsync(CreateParallelDataRequest, CancellationToken)

Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.

Public Method DeleteParallelData(DeleteParallelDataRequest)

Deletes a parallel data resource in Amazon Translate.

Public Method DeleteParallelDataAsync(DeleteParallelDataRequest, CancellationToken)

Deletes a parallel data resource in Amazon Translate.

Public Method DeleteTerminology(DeleteTerminologyRequest)

A synchronous action that deletes a custom terminology.

Public Method DeleteTerminologyAsync(DeleteTerminologyRequest, CancellationToken)

A synchronous action that deletes a custom terminology.

Public Method DescribeTextTranslationJob(DescribeTextTranslationJobRequest)

Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.

Public Method DescribeTextTranslationJobAsync(DescribeTextTranslationJobRequest, CancellationToken)

Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.

Public Method DetermineServiceOperationEndpoint(AmazonWebServiceRequest)

Returns the endpoint that will be used for a particular request.

Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method GetParallelData(GetParallelDataRequest)

Provides information about a parallel data resource.

Public Method GetParallelDataAsync(GetParallelDataRequest, CancellationToken)

Provides information about a parallel data resource.

Public Method GetTerminology(GetTerminologyRequest)

Retrieves a custom terminology.

Public Method GetTerminologyAsync(GetTerminologyRequest, CancellationToken)

Retrieves a custom terminology.

Public Method ImportTerminology(ImportTerminologyRequest)

Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.

If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.

Public Method ImportTerminologyAsync(ImportTerminologyRequest, CancellationToken)

Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.

If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.

Public Method ListLanguages(ListLanguagesRequest)

Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.

Public Method ListLanguagesAsync(ListLanguagesRequest, CancellationToken)

Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.

Public Method ListParallelData(ListParallelDataRequest)

Provides a list of your parallel data resources in Amazon Translate.

Public Method ListParallelDataAsync(ListParallelDataRequest, CancellationToken)

Provides a list of your parallel data resources in Amazon Translate.

Public Method ListTagsForResource(ListTagsForResourceRequest)

Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.

Public Method ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken)

Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.

Public Method ListTerminologies(ListTerminologiesRequest)

Provides a list of custom terminologies associated with your account.

Public Method ListTerminologiesAsync(ListTerminologiesRequest, CancellationToken)

Provides a list of custom terminologies associated with your account.

Public Method ListTextTranslationJobs(ListTextTranslationJobsRequest)

Gets a list of the batch translation jobs that you have submitted.

Public Method ListTextTranslationJobsAsync(ListTextTranslationJobsRequest, CancellationToken)

Gets a list of the batch translation jobs that you have submitted.

Public Method StartTextTranslationJob(StartTextTranslationJobRequest)

Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify auto as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.

Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.

Public Method StartTextTranslationJobAsync(StartTextTranslationJobRequest, CancellationToken)

Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify auto as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.

Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.

Public Method StopTextTranslationJob(StopTextTranslationJobRequest)

Stops an asynchronous batch translation job that is in progress.

If the job's state is IN_PROGRESS, the job will be marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state. Otherwise, the job is put into the STOPPED state.

Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job's JobId.

Public Method StopTextTranslationJobAsync(StopTextTranslationJobRequest, CancellationToken)

Stops an asynchronous batch translation job that is in progress.

If the job's state is IN_PROGRESS, the job will be marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state. Otherwise, the job is put into the STOPPED state.

Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job's JobId.

Public Method TagResource(TagResourceRequest)

Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.

Public Method TagResourceAsync(TagResourceRequest, CancellationToken)

Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.

Public Method TranslateDocument(TranslateDocumentRequest)

Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. TranslateDocument supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English).

If you set the Formality parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.

Public Method TranslateDocumentAsync(TranslateDocumentRequest, CancellationToken)

Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. TranslateDocument supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English).

If you set the Formality parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.

Public Method TranslateText(TranslateTextRequest)

Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.

Public Method TranslateTextAsync(TranslateTextRequest, CancellationToken)

Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.

Public Method UntagResource(UntagResourceRequest)

Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.

Public Method UntagResourceAsync(UntagResourceRequest, CancellationToken)

Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.

Public Method UpdateParallelData(UpdateParallelDataRequest)

Updates a previously created parallel data resource by importing a new input file from Amazon S3.

Public Method UpdateParallelDataAsync(UpdateParallelDataRequest, CancellationToken)

Updates a previously created parallel data resource by importing a new input file from Amazon S3.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5