Azure Text Translation SDK
Azure Text Translation is a cloud-based REST API feature of the Azure AI Translator service. The Text Translation API enables quick and accurate source-to-target text translations in real time. The Text Translation software development kit (SDK) is a set of libraries and tools that enable you to easily integrate Text Translation REST API capabilities into your applications. Text Translation SDK is available across programming platforms in C#/.NET, Java, JavaScript, and Python.
Supported languages
Text Translation SDK supports the programming languages and platforms:
Language → SDK version | Package | Client library | Supported API version |
---|---|---|---|
.NET/C# → 1.0.0 | NuGet | Azure SDK for .NET | Translator v3.0 |
Java✱ → 1.0.0 | Maven repository | Azure SDK for Java | Translator v3.0 |
JavaScript → 1.0.0 | npm | Azure SDK for JavaScript | Translator v3.0 |
Python → 1.0.1 | PyPi | Azure SDK for Python | Translator v3.0 |
✱ The Azure Text Translation SDK for Java is tested and supported on Windows, Linux, and macOS platforms. It isn't tested on other platforms and doesn't support Android deployments.
Changelog and release history
This section provides a version-based description of Text Translation feature and capability releases, changes, updates, and enhancements.
Translator Text SDK May 2024 GA release
This release includes the following updates:
- Version 1.0.0 (2024-05-21)
- Targets Text Translation v3.0
- GA version release
Translator Text SDK April 2023 preview release
This release includes the following updates:
- Version 1.0.0-beta.1 (2023-04-17)
- Targets Text Translation v3.0
- Initial version release
Use Text Translation SDK in your applications
The Text Translation SDK enables the use and management of the Text Translation service in your application. The SDK builds on the underlying Text Translation REST API allowing you to easily use those APIs within your programming language paradigm. Here's how you use the Text Translation SDK for your preferred programming language:
1. Install the SDK client library
dotnet add package Azure.AI.Translation.Text --version 1.0.0-beta.1
Install-Package Azure.AI.Translation.Text -Version 1.0.0-beta.1
2. Import the SDK client library into your application
using Azure;
using Azure.AI.Translation.Text;
3. Authenticate the client
Interaction with the Translator service using the client library begins with creating an instance of the TextTranslationClient
class. You need your API key and region to instantiate a client object.
The Text Translation API key is found in the Azure portal:
Using a regional endpoint
Uri endpoint = new("<your-endpoint>");
string key = "<your-key>";
string region = "<region>";
AzureKeyCredential credential = new(key);
TextTranslationClient client = new(credential, region);
4. Build your application
Create a client object to interact with the Text Translation SDK, and then call methods on that client object to interact with the service. The SDKs provide both synchronous and asynchronous methods. For more insight, see the Text Translation sample repository for .NET/C#.
Help options
The Azure 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 question, tag it with azure-text-translation
.