azure-ai-translation-document-py
यह क्या करती है
यह सेवा पूरे दस्तावेज़ों (जैसे Word, PDF, Excel) का एक भाषा से दूसरी भाषा में अनुवाद करती है और मूल फ़ॉर्मैटिंग को बनाए रखती है। एक साथ कई दस्तावेज़ों का अनुवाद करने के लिए यह बहुत अच्छी है।
कब इस्तेमाल करें
- ✓किसी PDF रिपोर्ट का पूरा अनुवाद दूसरी भाषा में करना।
- ✓कई PPTX प्रेज़ेंटेशन फ़ाइलों को अलग-अलग भाषाओं में बदलना।
- ✓विश्लेषण के लिए डेटा वाली Excel स्प्रेडशीट (XLSX) का दूसरी भाषा में अनुवाद करना।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-ai-translation-document-py/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“'originals' फ़ोल्डर में मौजूद सारे दस्तावेज़ों का स्पेनिश में अनुवाद करो और उन्हें 'translated' फ़ोल्डर में सेव करो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप वे दस्तावेज़ भेजते हैं जिनका अनुवाद करना है और लक्ष्य भाषा बताते हैं। सेवा उन सभी को प्रोसेस करती है और अनुवादित दस्तावेज़ उसी फ़ॉर्मेट में लौटा देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Azure AI Document Translation SDK for Python
Client library for Azure AI Translator document translation service for batch document translation with format preservation.
Installation
pip install azure-ai-translation-document
Environment Variables
AZURE_DOCUMENT_TRANSLATION_ENDPOINT=https://<resource>.cognitiveservices.azure.com
AZURE_DOCUMENT_TRANSLATION_KEY=<your-api-key> # If using API key
# Storage for source and target documents
AZURE_SOURCE_CONTAINER_URL=https://<storage>.blob.core.windows.net/<container>?<sas>
AZURE_TARGET_CONTAINER_URL=https://<storage>.blob.core.windows.net/<container>?<sas>
Authentication
API Key
import os
from azure.ai.translation.document import DocumentTranslationClient
from azure.core.credentials import AzureKeyCredential
endpoint = os.environ["AZURE_DOCUMENT_TRANSLATION_ENDPOINT"]
key = os.environ["AZURE_DOCUMENT_TRANSLATION_KEY"]
client = DocumentTranslationClient(endpoint, AzureKeyCredential(key))
Entra ID (Recommended)
from azure.ai.translation.document import DocumentTranslationClient
from azure.identity import DefaultAzureCredential
client = DocumentTranslationClient(
endpoint=os.environ["AZURE_DOCUMENT_TRANSLATION_ENDPOINT"],
credential=DefaultAzureCredential()
)
Basic Document Translation
from azure.ai.translation.document import DocumentTranslationInput, TranslationTarget
source_url = os.environ["AZURE_SOURCE_CONTAINER_URL"]
target_url = os.environ["AZURE_TARGET_CONTAINER_URL"]
# Start translation job
poller = client.begin_translation(
inputs=[
DocumentTranslationInput(
source_url=source_url,
targets=[
TranslationTarget(
target_url=target_url,
language="es" # Translate to Spanish
)
]
)
]
)
# Wait for completion
result = poller.result()
print(f"Status: {poller.status()}")
print(f"Documents translated: {poller.details.documents_succeeded_count}")
print(f"Documents failed: {poller.details.documents_failed_count}")
Multiple Target Languages
poller = client.begin_translation(
inputs=[
DocumentTranslationInput(
source_url=source_url,
targets=[
TranslationTarget(target_url=target_url_es, language="es"),
TranslationTarget(target_url=target_url_fr, language="fr"),
TranslationTarget(target_url=target_url_de, language="de")
]
)
]
)
Translate Single Document
from azure.ai.translation.document import SingleDocumentTranslationClient
single_client = SingleDocumentTranslationClient(endpoint, AzureKeyCredential(key))
with open("document.docx", "rb") as f:
document_content = f.read()
result = single_client.translate(
body=document_content,
target_language="es",
content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
)
# Save translated document
with open("document_es.docx", "wb") as f:
f.write(result)
Check Translation Status
# Get all translation operations
operations = client.list_translation_statuses()
for op in operations:
print(f"Operation ID: {op.id}")
print(f"Status: {op.status}")
print(f"Created: {op.created_on}")
print(f"Total documents: {op.documents_total_count}")
print(f"Succeeded: {op.documents_succeeded_count}")
print(f"Failed: {op.documents_failed_count}")
List Document Statuses
# Get status of individual documents in a job
operation_id = poller.id
document_statuses = client.list_document_statuses(operation_id)
for doc in document_statuses:
print(f"Document: {doc.source_document_url}")
print(f" Status: {doc.status}")
print(f" Translated to: {doc.translated_to}")
if doc.error:
print(f" Error: {doc.error.message}")
Cancel Translation
# Cancel a running translation
client.cancel_translation(operation_id)
Using Glossary
from azure.ai.translation.document import TranslationGlossary
poller = client.begin_translation(
inputs=[
DocumentTranslationInput(
source_url=source_url,
targets=[
TranslationTarget(
target_url=target_url,
language="es",
glossaries=[
TranslationGlossary(
…
अक्सर पूछे जाने वाले सवाल
मैं किस तरह की फ़ाइलों का अनुवाद कर सकता हूँ?
आप Word (.docx), PDF, Excel (.xlsx), PowerPoint (.pptx) के साथ-साथ टेक्स्ट फ़ाइलें (.txt), HTML, CSV, JSON और दूसरे फ़ॉर्मेट का अनुवाद कर सकते हैं।
क्या फ़ाइलों को किसी खास जगह रखना ज़रूरी है?
हाँ, मूल और अनुवादित दोनों फ़ाइलें Azure Blob Storage के containers में होनी चाहिए।
क्या खास शब्दों के लिए glossary इस्तेमाल कर सकते हैं?
हाँ, आप एक glossary दे सकते हैं, ताकि तकनीकी या खास शब्द हर जगह एक जैसे अनुवाद हों।
जानकारी
लेखक का मूल विवरण
Azure AI Document Translation SDK for batch translation of documents with format preservation. Use for translating Word, PDF, Excel, PowerPoint, and other document formats at scale.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #3896
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
mcporter
394kयह आपके एजेंट को HTTP या stdio पर MCP सर्वर और उनके टूल सूचीबद्ध करने, चलाने और जांचने देती है, और उनकी साइन-इन सेटिंग्स प्रबंधित करती है।
fastmcp
260kआपको Python में MCP सर्वर बनाने, जाँचने और तैनात करने में मदद करती है, जो AI सहायकों को आपके API, डेटाबेस या फ़ाइलों तक टूल के रूप में पहुँच देता है।
mcp-oauth-remote-gateway
260kजब Hermes किसी सर्वर पर चलता है, तो रिमोट MCP सर्वर के लिए OAuth साइन-इन हाथ से करने में मदद करती है, जहाँ सामान्य ब्राउज़र साइन-इन नहीं पहुँच पाता।