Share via


TranslateInputItem Class

Definition

Element containing the text for translation.

public class TranslateInputItem : System.ClientModel.Primitives.IJsonModel<Azure.AI.Translation.Text.TranslateInputItem>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Translation.Text.TranslateInputItem>
type TranslateInputItem = class
    interface IJsonModel<TranslateInputItem>
    interface IPersistableModel<TranslateInputItem>
Public Class TranslateInputItem
Implements IJsonModel(Of TranslateInputItem), IPersistableModel(Of TranslateInputItem)
Inheritance
TranslateInputItem
Implements

Constructors

Name Description
TranslateInputItem(String, IEnumerable<TranslationTarget>, String, String, Nullable<TextType>)

Initializes a new instance of TranslateInputItem with optional parameters.

TranslateInputItem(String, IEnumerable<TranslationTarget>)

Initializes a new instance of TranslateInputItem.

TranslateInputItem(String, TranslationTarget, String, String, Nullable<TextType>)

Initializes a new instance of TranslateInputItem with a single translation target.

Properties

Name Description
Language

Specifies the language of the input text. Find which languages are available to translate by looking up supported languages using the translation scope. If the language parameter isn't specified, automatic language detection is applied to determine the source language.

You must use the language parameter rather than autodetection when using the dynamic dictionary feature. Note: the dynamic dictionary feature is case-sensitive.

Script

Specifies the script of the input text.

Text

Text to translate.

TextType

Defines whether the text being translated is plain text or HTML text. Any HTML needs to be a well-formed, complete element. Possible values are: plain (default) or html.

TranslationTargets

Translation target parameters.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<TranslateInputItem>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<TranslateInputItem>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<TranslateInputItem>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<TranslateInputItem>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<TranslateInputItem>.Write(ModelReaderWriterOptions)

Applies to