Breyta

Deila með


What is Azure Text Translation?

Azure Text Translation is a cloud-based REST API feature of the Translator service that uses neural machine translation technology to enable quick and accurate source-to-target text translation in real time across all supported languages. In this overview, you learn how the Text Translation REST APIs enable you to build intelligent solutions for your applications and workflows.

Text translation documentation contains the following article types:

  • Quickstarts. Getting-started instructions to guide you through making requests to the service.
  • How-to guides. Instructions for accessing and using the service in more specific or customized ways.
  • Reference articles. REST API documentation and programming language-based content.

Text translation features

Text Translation supports the following methods:

  • Languages. Returns a list of languages supported by Translate, Transliterate, and Dictionary Lookup operations. This request doesn't require authentication; just copy and paste the following GET request into your favorite REST API tool or browser:

    https://api.cognitive.microsofttranslator.com/languages?api-version=3.0
    
  • Translate. Renders single source-language text to multiple target-language texts with a single request.

  • Transliterate. Converts characters or letters of a source language to the corresponding characters or letters of a target language.

  • Detect. Returns the source code language code and a boolean variable denoting whether the detected language is supported for text translation and transliteration.

    Note

    You can Translate, Transliterate, and Detect text with a single REST API call .

  • Dictionary lookup. Returns equivalent words for the source term in the target language.

  • Dictionary example Returns grammatical structure and context examples for the source term and target term pair.

Text translation deployment options

Add Text Translation to your projects and applications using the following resources:

Data residency

Text Translation data residency depends on the Azure region where your Translator resource was created:

Text Translation data residency

✔️ Feature: Translator Text

Service endpoint Request processing data center
Global (recommended):
api.cognitive.microsofttranslator.com
Closest available data center.
Americas:
api-nam.cognitive.microsofttranslator.com
East US 2 • West US 2
Asia Pacific:
api-apc.cognitive.microsofttranslator.com
Japan East • Southeast Asia
Europe (except Switzerland):
api-eur.cognitive.microsofttranslator.com
France Central • West Europe
Switzerland:
For more information, see Switzerland service endpoints.
Switzerland North • Switzerland West

Switzerland service endpoints

Customers with a resource located in Switzerland North or Switzerland West can ensure that their Text API requests are served within Switzerland. To ensure that requests are handled in Switzerland, create the Translator resource in the Resource region Switzerland North or Switzerland West, then use the resource's custom endpoint in your API requests.

For example: If you create a Translator resource in Azure portal with Resource region as Switzerland North and your resource name is my-swiss-n, then your custom endpoint is https​://my-swiss-n.cognitiveservices.azure.com. And a sample request to translate is:

// Pass secret key and region using headers to a custom endpoint
curl -X POST "https://my-swiss-n.cognitiveservices.azure.com/translator/text/v3.0/translate?to=fr" \
-H "Ocp-Apim-Subscription-Key: xxx" \
-H "Ocp-Apim-Subscription-Region: switzerlandnorth" \
-H "Content-Type: application/json" \
-d "[{'Text':'Hello'}]" -v

Custom Translator isn't currently available in Switzerland.

Get started with Text Translation

Ready to begin?

Next steps

Dive deeper into the Text Translation REST API: