Skip to main content
This guide demonstrates how to detect language, perform translations, and transliterate text using Azure’s Translator service. You’ll see REST examples (detect, translate, transliterate) and a concise Python SDK example using the azure-ai-translation-text package.
A dark-themed slide showing the KodeKloud logo at the top and the centered title "Working with Translator Service." Small copyright text "© Copyright KodeKloud" appears in the lower-left corner.
Overview
  • Detect: Identify the language of a given piece of text and learn whether translation or transliteration is supported.
  • Translate: Convert text between languages (one or more target languages).
  • Transliterate: Convert text from one script to another (e.g., Arabic script → Latin script).
  • SDK option: Use the Azure Python SDK for integration with fewer manual HTTP calls.
Quick reference links API endpoint summary Detect (REST) Use the detect endpoint to identify the language and whether translation/transliteration is supported for the input text. Example REST request (detect):
Example response (detect):
Use the returned ISO language code (for example, “ar”) to decide the next action — translate to other languages or transliterate to another script. Translate (REST) Translate the detected source language into one or more target languages by calling the translate endpoint and specifying target languages as query parameters. Example REST request (translate):
Example response (translate):
Transliteration (REST) Transliteration converts text from one writing system (script) into another. Provide the source language and script and the desired target script. Example REST request (transliterate):
Example response (transliterate):
Translate vs. Transliterate — quick comparison Python SDK (azure-ai-translation-text) You can perform detection, translation, and transliteration using the Azure Python SDK. Install and verify the package:
Example installation output (trimmed):
Complete Python example This example detects language (if returned by the service), translates a Korean sentence into English and French, and transliterates it into the Latin script.
Example console output after running the script:
Credentials and resource types You can use either:
  • A Translation resource, or
  • An Azure AI Multi-Service (Cognitive Services) resource.
Each resource type provides different endpoint and key formats. Use the credentials for the resource you provisioned when initializing the SDK or sending REST requests.
If you need consistent, domain-specific translations (for example, standardized product names or industry terminology), consider custom glossaries or training a custom translator model. Pre-built models are great for general-purpose translation, but custom models and glossaries let you control vocabulary and translation behavior.
Additional resources Use these links to explore supported languages, scripts, and advanced customization options such as glossaries and custom models.

Watch Video