{"id":"feec1083-8fcc-4881-8ca1-6156e1860bf2","shortId":"S3y8rr","kind":"skill","title":"azure-ai-translation-text-py","tagline":"Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications.","description":"# Azure AI Text Translation SDK for Python\n\nClient library for Azure AI Translator text translation service for real-time text translation, transliteration, and language operations.\n\n## Installation\n\n```bash\npip install azure-ai-translation-text\n```\n\n## Environment Variables\n\n```bash\nAZURE_TRANSLATOR_KEY=<your-api-key>\nAZURE_TRANSLATOR_REGION=<your-region>  # e.g., eastus, westus2\n# Or use custom endpoint\nAZURE_TRANSLATOR_ENDPOINT=https://<resource>.cognitiveservices.azure.com\n```\n\n## Authentication\n\n### API Key with Region\n\n```python\nimport os\nfrom azure.ai.translation.text import TextTranslationClient\nfrom azure.core.credentials import AzureKeyCredential\n\nkey = os.environ[\"AZURE_TRANSLATOR_KEY\"]\nregion = os.environ[\"AZURE_TRANSLATOR_REGION\"]\n\n# Create credential with region\ncredential = AzureKeyCredential(key)\nclient = TextTranslationClient(credential=credential, region=region)\n```\n\n### API Key with Custom Endpoint\n\n```python\nendpoint = os.environ[\"AZURE_TRANSLATOR_ENDPOINT\"]\n\nclient = TextTranslationClient(\n    credential=AzureKeyCredential(key),\n    endpoint=endpoint\n)\n```\n\n### Entra ID (Recommended)\n\n```python\nfrom azure.ai.translation.text import TextTranslationClient\nfrom azure.identity import DefaultAzureCredential\n\nclient = TextTranslationClient(\n    credential=DefaultAzureCredential(),\n    endpoint=os.environ[\"AZURE_TRANSLATOR_ENDPOINT\"]\n)\n```\n\n## Basic Translation\n\n```python\n# Translate to a single language\nresult = client.translate(\n    body=[\"Hello, how are you?\", \"Welcome to Azure!\"],\n    to=[\"es\"]  # Spanish\n)\n\nfor item in result:\n    for translation in item.translations:\n        print(f\"Translated: {translation.text}\")\n        print(f\"Target language: {translation.to}\")\n```\n\n## Translate to Multiple Languages\n\n```python\nresult = client.translate(\n    body=[\"Hello, world!\"],\n    to=[\"es\", \"fr\", \"de\", \"ja\"]  # Spanish, French, German, Japanese\n)\n\nfor item in result:\n    print(f\"Source: {item.detected_language.language if item.detected_language else 'unknown'}\")\n    for translation in item.translations:\n        print(f\"  {translation.to}: {translation.text}\")\n```\n\n## Specify Source Language\n\n```python\nresult = client.translate(\n    body=[\"Bonjour le monde\"],\n    from_parameter=\"fr\",  # Source is French\n    to=[\"en\", \"es\"]\n)\n```\n\n## Language Detection\n\n```python\nresult = client.translate(\n    body=[\"Hola, como estas?\"],\n    to=[\"en\"]\n)\n\nfor item in result:\n    if item.detected_language:\n        print(f\"Detected language: {item.detected_language.language}\")\n        print(f\"Confidence: {item.detected_language.score:.2f}\")\n```\n\n## Transliteration\n\nConvert text from one script to another:\n\n```python\nresult = client.transliterate(\n    body=[\"konnichiwa\"],\n    language=\"ja\",\n    from_script=\"Latn\",  # From Latin script\n    to_script=\"Jpan\"      # To Japanese script\n)\n\nfor item in result:\n    print(f\"Transliterated: {item.text}\")\n    print(f\"Script: {item.script}\")\n```\n\n## Dictionary Lookup\n\nFind alternate translations and definitions:\n\n```python\nresult = client.lookup_dictionary_entries(\n    body=[\"fly\"],\n    from_parameter=\"en\",\n    to=\"es\"\n)\n\nfor item in result:\n    print(f\"Source: {item.normalized_source} ({item.display_source})\")\n    for translation in item.translations:\n        print(f\"  Translation: {translation.normalized_target}\")\n        print(f\"  Part of speech: {translation.pos_tag}\")\n        print(f\"  Confidence: {translation.confidence:.2f}\")\n```\n\n## Dictionary Examples\n\nGet usage examples for translations:\n\n```python\nfrom azure.ai.translation.text.models import DictionaryExampleTextItem\n\nresult = client.lookup_dictionary_examples(\n    body=[DictionaryExampleTextItem(text=\"fly\", translation=\"volar\")],\n    from_parameter=\"en\",\n    to=\"es\"\n)\n\nfor item in result:\n    for example in item.examples:\n        print(f\"Source: {example.source_prefix}{example.source_term}{example.source_suffix}\")\n        print(f\"Target: {example.target_prefix}{example.target_term}{example.target_suffix}\")\n```\n\n## Get Supported Languages\n\n```python\n# Get all supported languages\nlanguages = client.get_supported_languages()\n\n# Translation languages\nprint(\"Translation languages:\")\nfor code, lang in languages.translation.items():\n    print(f\"  {code}: {lang.name} ({lang.native_name})\")\n\n# Transliteration languages\nprint(\"\\nTransliteration languages:\")\nfor code, lang in languages.transliteration.items():\n    print(f\"  {code}: {lang.name}\")\n    for script in lang.scripts:\n        print(f\"    {script.code} -> {[t.code for t in script.to_scripts]}\")\n\n# Dictionary languages\nprint(\"\\nDictionary languages:\")\nfor code, lang in languages.dictionary.items():\n    print(f\"  {code}: {lang.name}\")\n```\n\n## Break Sentence\n\nIdentify sentence boundaries:\n\n```python\nresult = client.find_sentence_boundaries(\n    body=[\"Hello! How are you? I hope you are well.\"],\n    language=\"en\"\n)\n\nfor item in result:\n    print(f\"Sentence lengths: {item.sent_len}\")\n```\n\n## Translation Options\n\n```python\nresult = client.translate(\n    body=[\"Hello, world!\"],\n    to=[\"de\"],\n    text_type=\"html\",           # \"plain\" or \"html\"\n    profanity_action=\"Marked\",  # \"NoAction\", \"Deleted\", \"Marked\"\n    profanity_marker=\"Asterisk\", # \"Asterisk\", \"Tag\"\n    include_alignment=True,      # Include word alignment\n    include_sentence_length=True # Include sentence boundaries\n)\n\nfor item in result:\n    translation = item.translations[0]\n    print(f\"Translated: {translation.text}\")\n    if translation.alignment:\n        print(f\"Alignment: {translation.alignment.proj}\")\n    if translation.sent_len:\n        print(f\"Sentence lengths: {translation.sent_len.src_sent_len}\")\n```\n\n## Async Client\n\n```python\nfrom azure.ai.translation.text.aio import TextTranslationClient\nfrom azure.core.credentials import AzureKeyCredential\n\nasync def translate_text():\n    async with TextTranslationClient(\n        credential=AzureKeyCredential(key),\n        region=region\n    ) as client:\n        result = await client.translate(\n            body=[\"Hello, world!\"],\n            to=[\"es\"]\n        )\n        print(result[0].translations[0].text)\n```\n\n## Client Methods\n\n| Method | Description |\n|--------|-------------|\n| `translate` | Translate text to one or more languages |\n| `transliterate` | Convert text between scripts |\n| `detect` | Detect language of text |\n| `find_sentence_boundaries` | Identify sentence boundaries |\n| `lookup_dictionary_entries` | Dictionary lookup for translations |\n| `lookup_dictionary_examples` | Get usage examples |\n| `get_supported_languages` | List supported languages |\n\n## Best Practices\n\n1. **Batch translations** — Send multiple texts in one request (up to 100)\n2. **Specify source language** when known to improve accuracy\n3. **Use async client** for high-throughput scenarios\n4. **Cache language list** — Supported languages don't change frequently\n5. **Handle profanity** appropriately for your application\n6. **Use html text_type** when translating HTML content\n7. **Include alignment** for applications needing word mapping\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["azure","translation","text","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-azure-ai-translation-text-py","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-ai-translation-text-py","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34928 github stars · SKILL.md body (7,407 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T18:50:28.653Z","embedding":null,"createdAt":"2026-04-18T21:32:03.325Z","updatedAt":"2026-04-24T18:50:28.653Z","lastSeenAt":"2026-04-24T18:50:28.653Z","tsv":"'0':579,635,637 '1':688 '100':699 '2':700 '2f':288,378 '3':709 '4':718 '5':728 '6':735 '7':744 'accuraci':708 'action':550,764 'ai':3,8,32,42,63 'align':561,565,588,746 'altern':331 'anoth':296 'api':87,125 'applic':30,734,748,758 'appropri':731 'ask':802 'asterisk':557,558 'async':600,611,615,711 'authent':86 'await':626 'azur':2,7,31,41,62,69,72,82,104,109,133,161,181 'azure-ai-translation-text':61 'azure-ai-translation-text-pi':1 'azure.ai.translation.text':95,148 'azure.ai.translation.text.aio':604 'azure.ai.translation.text.models':388 'azure.core.credentials':99,608 'azure.identity':152 'azurekeycredenti':101,117,139,610,619 'bash':58,68 'basic':164 'batch':689 'best':686 'bodi':174,209,248,266,300,340,395,511,538,628 'bonjour':249 'boundari':505,510,572,663,666,810 'break':501 'cach':719 'chang':726 'clarif':804 'clear':777 'client':38,119,136,155,601,624,639,712 'client.find':508 'client.get':441 'client.lookup':337,392 'client.translate':173,208,247,265,537,627 'client.transliterate':299 'code':450,456,466,472,493,499 'cognitiveservices.azure.com':85 'como':268 'confid':286,376 'content':28,743 'convert':290,652 'creat':112 'credenti':113,116,121,122,138,157,618 'criteria':813 'custom':80,128 'de':215,542 'def':612 'defaultazurecredenti':154,158 'definit':334 'delet':553 'describ':765,781 'descript':642 'detect':20,262,281,656,657 'dictionari':22,328,338,379,393,487,668,670,675 'dictionaryexampletextitem':390,396 'e.g':75 'eastus':76 'els':232 'en':259,271,344,403,522 'endpoint':81,84,129,131,135,141,142,159,163 'entra':143 'entri':339,669 'environ':66,793 'environment-specif':792 'es':183,213,260,346,405,632 'esta':269 'exampl':380,383,394,411,676,679 'example.source':417,419,421 'example.target':426,428,430 'execut':760 'expert':798 'f':194,198,226,239,280,285,321,325,352,363,368,375,415,424,455,471,479,498,528,581,587,594 'find':330,661 'fli':341,398 'fr':214,254 'french':218,257 'frequent':727 'german':219 'get':381,432,436,677,680 'handl':729 'hello':175,210,512,539,629 'high':715 'high-throughput':714 'hola':267 'hope':517 'html':545,548,737,742 'id':144 'identifi':503,664 'import':92,96,100,149,153,389,605,609 'improv':707 'includ':560,563,566,570,745 'input':807 'instal':57,60 'item':186,222,273,317,348,407,524,574 'item.detected':230,277 'item.detected_language.language':228,283 'item.detected_language.score':287 'item.display':356 'item.examples':413 'item.normalized':354 'item.script':327 'item.sent':531 'item.text':323 'item.translations':192,237,361,578 'ja':216,303 'japanes':220,314 'jpan':312 'key':71,88,102,106,118,126,140,620 'known':705 'konnichiwa':301 'lang':451,467,494 'lang.name':457,473,500 'lang.native':458 'lang.scripts':477 'languag':19,55,171,200,205,231,244,261,278,282,302,434,439,440,443,445,448,461,464,488,491,521,650,658,682,685,703,720,723 'languages.dictionary.items':496 'languages.translation.items':453 'languages.transliteration.items':469 'latin':308 'latn':306 'le':250 'len':532,592,599 'length':530,568,596 'librari':39 'limit':769 'list':683,721 'lookup':23,329,667,671,674 'map':751 'mark':551,554 'marker':556 'match':778 'method':640,641 'miss':815 'mond':251 'multipl':204,692 'name':459 'ndictionari':490 'need':749 'noaction':552 'ntransliter':463 'one':293,647,695 'oper':56 'option':534 'os':93 'os.environ':103,108,132,160 'output':787 'overview':768 'paramet':253,343,402 'part':369 'permiss':808 'pip':59 'plain':546 'practic':687 'prefix':418,427 'print':193,197,225,238,279,284,320,324,351,362,367,374,414,423,446,454,462,470,478,489,497,527,580,586,593,633 'profan':549,555,730 'py':6 'python':37,91,130,146,166,206,245,263,297,335,386,435,506,535,602 'real':14,49 'real-tim':13,48 'recommend':145 'region':74,90,107,111,115,123,124,621,622 'request':696 'requir':806 'result':172,188,207,224,246,264,275,298,319,336,350,391,409,507,526,536,576,625,634 'review':799 'safeti':809 'scenario':717 'scope':780 'script':294,305,309,311,315,326,475,486,655 'script.code':480 'script.to':485 'sdk':11,35 'send':691 'sent':598 'sentenc':502,504,509,529,567,571,595,662,665 'servic':46 'singl':170 'skill':756,772 'skill-azure-ai-translation-text-py' 'sourc':227,243,255,353,355,357,416,702 'source-sickn33' 'spanish':184,217 'specif':794 'specifi':242,701 'speech':371 'stop':800 'substitut':790 'success':812 'suffix':422,431 'support':433,438,442,681,684,722 't.code':481 'tag':373,559 'target':199,366,425 'task':776 'term':420,429 'test':796 'text':5,9,16,27,33,44,51,65,291,397,543,614,638,645,653,660,693,738 'texttranslationcli':97,120,137,150,156,606,617 'throughput':716 'time':15,50 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'translat':4,10,17,26,34,43,45,52,64,70,73,83,105,110,134,162,165,167,190,195,202,235,332,359,364,385,399,444,447,533,577,582,613,636,643,644,673,690,741 'translation.alignment':585 'translation.alignment.proj':589 'translation.confidence':377 'translation.normalized':365 'translation.pos':372 'translation.sent':591 'translation.sent_len.src':597 'translation.text':196,241,583 'translation.to':201,240 'transliter':18,53,289,322,460,651 'treat':785 'true':562,569 'type':544,739 'unknown':233 'usag':382,678 'use':24,79,710,736,754,770 'valid':795 'variabl':67 'volar':400 'welcom':179 'well':520 'westus2':77 'word':564,750 'workflow':762 'world':211,540,630","prices":[{"id":"ca41e07c-3f43-49b8-b16b-b0630dec1ca9","listingId":"feec1083-8fcc-4881-8ca1-6156e1860bf2","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:32:03.325Z"}],"sources":[{"listingId":"feec1083-8fcc-4881-8ca1-6156e1860bf2","source":"github","sourceId":"sickn33/antigravity-awesome-skills/azure-ai-translation-text-py","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-ai-translation-text-py","isPrimary":false,"firstSeenAt":"2026-04-18T21:32:03.325Z","lastSeenAt":"2026-04-24T18:50:28.653Z"}],"details":{"listingId":"feec1083-8fcc-4881-8ca1-6156e1860bf2","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"azure-ai-translation-text-py","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34928,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"71d23ed8d450cb368f83aa2f49e01ee902f74f63","skill_md_path":"skills/azure-ai-translation-text-py/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-ai-translation-text-py"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"azure-ai-translation-text-py","description":"Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-ai-translation-text-py"},"updatedAt":"2026-04-24T18:50:28.653Z"}}