TranslationTextModelFactory.TranslateInputItem Method

Definition

Element containing the text for translation.

public static Azure.AI.Translation.Text.TranslateInputItem TranslateInputItem(string text = default, string script = default, string language = default, Azure.AI.Translation.Text.TextType? textType = default, System.Collections.Generic.IEnumerable<Azure.AI.Translation.Text.TranslationTarget> translationTargets = default);
static member TranslateInputItem : string * string * string * Nullable<Azure.AI.Translation.Text.TextType> * seq<Azure.AI.Translation.Text.TranslationTarget> -> Azure.AI.Translation.Text.TranslateInputItem
Public Shared Function TranslateInputItem (Optional text As String = Nothing, Optional script As String = Nothing, Optional language As String = Nothing, Optional textType As Nullable(Of TextType) = Nothing, Optional translationTargets As IEnumerable(Of TranslationTarget) = Nothing) As TranslateInputItem

Parameters

text
String

Text to translate.

script
String

Specifies the script of the input text.

language
String

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.

textType
Nullable<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
IEnumerable<TranslationTarget>

Translation target parameters.

Returns

A new TranslateInputItem instance for mocking.

Applies to