Skip to content

TranslateDocumentRequest

Source code in docs_src/capo_translate/types/translate_document_request.py
class TranslateDocumentRequest(TypedDict, closed=True):
    document: "capo_translate.types.document.Document"
    """<p>The content and content type for the document to be translated. The document size must not exceed 100 KB.</p>"""
    terminology_names: NotRequired[
        "capo_translate.types.resource_name_list.ResourceNameList"
    ]
    """<p>The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request.</p> <p>Use the <a>ListTerminologies</a> operation to get the available terminology lists.</p> <p>For more information about custom terminology lists, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html">Custom terminology</a>.</p>"""
    source_language_code: "capo_translate.types.language_code_string.LanguageCodeString"
    """<p>The language code for the language of the source text. For a list of supported language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p> <p>To have Amazon Translate determine the source language of your text, you can specify <code>auto</code> in the <code>SourceLanguageCode</code> field. If you specify <code>auto</code>, Amazon Translate will call <a href="https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html">Amazon Comprehend</a> to determine the source language.</p> <note> <p>If you specify <code>auto</code>, you must send the <code>TranslateDocument</code> request in a region that supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported. </p> </note>"""
    target_language_code: "capo_translate.types.language_code_string.LanguageCodeString"
    """<p>The language code requested for the translated document. For a list of supported language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>"""
    settings: NotRequired[
        "capo_translate.types.translation_settings.TranslationSettings"
    ]
    """<p>Settings to configure your translation output. You can configure the following options:</p> <ul> <li> <p>Brevity: not supported.</p> </li> <li> <p>Formality: sets the formality level of the output text.</p> </li> <li> <p>Profanity: masks profane words and phrases in your translation output.</p> </li> </ul>"""

document instance-attribute

document: Document

The content and content type for the document to be translated. The document size must not exceed 100 KB.

settings instance-attribute

settings: NotRequired[TranslationSettings]

Settings to configure your translation output. You can configure the following options:

  • Brevity: not supported.

  • Formality: sets the formality level of the output text.

  • Profanity: masks profane words and phrases in your translation output.

source_language_code instance-attribute

source_language_code: LanguageCodeString

The language code for the language of the source text. For a list of supported language codes, see Supported languages.

To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.

If you specify auto, you must send the TranslateDocument request in a region that supports Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported.

target_language_code instance-attribute

target_language_code: LanguageCodeString

The language code requested for the translated document. For a list of supported language codes, see Supported languages.

terminology_names instance-attribute

terminology_names: NotRequired[ResourceNameList]

The name of a terminology list file to add to the translation job. This file provides source terms and the desired translation for each term. A terminology list can contain a maximum of 256 terms. You can use one custom terminology resource in your translation request.

Use the ListTerminologies operation to get the available terminology lists.

For more information about custom terminology lists, see Custom terminology.