Skip to content

Commit

Permalink
improve begin_translation docstring (#20401)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico authored and iscai-msft committed Sep 29, 2021
1 parent a2cc23c commit f3d56f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,13 @@ def begin_translation(
self, *args, **kwargs
): # pylint: disable=client-method-missing-type-annotations
"""Begin translating the document(s) in your source container to your target container
in the given language. To perform a single translation from source to target, pass the `source_url`,
`target_url`, and `target_language_code` parameters including any optional keyword arguments.
To pass multiple inputs for translation, pass the `inputs` parameter as a list of
:class:`~azure.ai.translation.document.DocumentTranslationInput`.
in the given language. There are two ways to call this method:
1) To perform translation on documents from a single source container to a single target container, pass the
`source_url`, `target_url`, and `target_language_code` parameters including any optional keyword arguments.
2) To pass multiple inputs for translation (multiple sources or targets), pass the `inputs` parameter
as a list of :class:`~azure.ai.translation.document.DocumentTranslationInput`.
For supported languages and document formats, see the service documentation:
https://docs.microsoft.com/azure/cognitive-services/translator/document-translation/overview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ async def begin_translation(
self, *args, **kwargs
): # pylint: disable=client-method-missing-type-annotations
"""Begin translating the document(s) in your source container to your target container
in the given language. To perform a single translation from source to target, pass the `source_url`,
`target_url`, and `target_language_code` parameters including any optional keyword arguments.
To pass multiple inputs for translation, pass the `inputs` parameter as a list of
:class:`~azure.ai.translation.document.DocumentTranslationInput`.
in the given language. There are two ways to call this method:
1) To perform translation on documents from a single source container to a single target container, pass the
`source_url`, `target_url`, and `target_language_code` parameters including any optional keyword arguments.
2) To pass multiple inputs for translation (multiple sources or targets), pass the `inputs` parameter
as a list of :class:`~azure.ai.translation.document.DocumentTranslationInput`.
For supported languages and document formats, see the service documentation:
https://docs.microsoft.com/azure/cognitive-services/translator/document-translation/overview
Expand Down

0 comments on commit f3d56f1

Please sign in to comment.