Document Translation SDK
Document Translation is a cloud-based REST API feature of the Azure AI Translator service. The Document Translation API enables quick and accurate source-to-target whole document translations, asynchronously, in supported languages and various file formats. The Document Translation software development kit (SDK) is a set of libraries and tools that enable you to easily integrate Document Translation REST API capabilities into your applications.
Document Translation SDK supports the following programming languages:
|Language → SDK version||Package||Client library||Supported API version|
|.NET/C# → 1.0.0||NuGet||Azure SDK for .NET||Document Translation v1.1|
|Python → 1.0.0||PyPi||Azure SDK for Python||Document Translation v1.1|
Changelog and release history
This section provides a version-based description of Document Translation feature and capability releases, changes, updates, and enhancements.
Use Document Translation SDK in your applications
The Document Translation SDK enables the use and management of the Translation service in your application. The SDK builds on the underlying Document Translation REST APIs for use within your programming language paradigm. Choose your preferred programming language:
1. Install the SDK client library
dotnet add package Azure.AI.Translation.Document --version 1.0.0
Install-Package Azure.AI.Translation.Document -Version 1.0.0
2. Import the SDK client library into your application
3. Authenticate the client
Create an instance of the
DocumentTranslationClient object to interact with the Document Translation SDK, and then call methods on that client object to interact with the service. The
DocumentTranslationClient is the primary interface for using the Document Translation client library. It provides both synchronous and asynchronous methods to perform operations.
private static readonly string endpoint = "<your-custom-endpoint>"; private static readonly string key = "<your-key>"; DocumentTranslationClient client = new DocumentTranslationClient(new Uri(endpoint), new AzureKeyCredential(key));
4. Build your application
The Document Translation interface requires the following input:
- Upload your files to an Azure Blob Storage source container (sourceUri).
- Provide a target container where the translated documents can be written (targetUri).
- Include the target language code (targetLanguage).
Uri sourceUri = new Uri("<your-source container-url"); Uri targetUri = new Uri("<your-target-container-url>"); string targetLanguage = "<target-language-code>"; DocumentTranslationInput input = new DocumentTranslationInput(sourceUri, targetUri, targetLanguage)
The Microsoft Q&A and Stack Overflow forums are available for the developer community to ask and answer questions about Azure Text Translation and other services. Microsoft monitors the forums and replies to questions that the community has yet to answer.
To make sure that we see your Microsoft Q&A question, tag it with
To make sure that we see your Stack Overflow question, tag it with
Azure AI Translator.