Skip to content

Commit 5d6babb

Browse files
improve begin_translation docstring (Azure#20401)
1 parent 82e2b54 commit 5d6babb

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,13 @@ def begin_translation(
113113
self, *args, **kwargs
114114
): # pylint: disable=client-method-missing-type-annotations
115115
"""Begin translating the document(s) in your source container to your target container
116-
in the given language. To perform a single translation from source to target, pass the `source_url`,
117-
`target_url`, and `target_language_code` parameters including any optional keyword arguments.
118-
To pass multiple inputs for translation, pass the `inputs` parameter as a list of
119-
:class:`~azure.ai.translation.document.DocumentTranslationInput`.
116+
in the given language. There are two ways to call this method:
117+
118+
1) To perform translation on documents from a single source container to a single target container, pass the
119+
`source_url`, `target_url`, and `target_language_code` parameters including any optional keyword arguments.
120+
121+
2) To pass multiple inputs for translation (multiple sources or targets), pass the `inputs` parameter
122+
as a list of :class:`~azure.ai.translation.document.DocumentTranslationInput`.
120123
121124
For supported languages and document formats, see the service documentation:
122125
https://docs.microsoft.com/azure/cognitive-services/translator/document-translation/overview

sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_client_async.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,13 @@ async def begin_translation(
122122
self, *args, **kwargs
123123
): # pylint: disable=client-method-missing-type-annotations
124124
"""Begin translating the document(s) in your source container to your target container
125-
in the given language. To perform a single translation from source to target, pass the `source_url`,
126-
`target_url`, and `target_language_code` parameters including any optional keyword arguments.
127-
To pass multiple inputs for translation, pass the `inputs` parameter as a list of
128-
:class:`~azure.ai.translation.document.DocumentTranslationInput`.
125+
in the given language. There are two ways to call this method:
126+
127+
1) To perform translation on documents from a single source container to a single target container, pass the
128+
`source_url`, `target_url`, and `target_language_code` parameters including any optional keyword arguments.
129+
130+
2) To pass multiple inputs for translation (multiple sources or targets), pass the `inputs` parameter
131+
as a list of :class:`~azure.ai.translation.document.DocumentTranslationInput`.
129132
130133
For supported languages and document formats, see the service documentation:
131134
https://docs.microsoft.com/azure/cognitive-services/translator/document-translation/overview

0 commit comments

Comments
 (0)