Share via


AITranslationTextModelFactory.TranslationText Method

Definition

Initializes a new instance of TranslationText.

public static Azure.AI.Translation.Text.TranslationText TranslationText (string targetLanguage = default, string text = default, Azure.AI.Translation.Text.TransliteratedText transliteration = default, Azure.AI.Translation.Text.TranslatedTextAlignment alignment = default, Azure.AI.Translation.Text.SentenceBoundaries sentenceBoundaries = default);
static member TranslationText : string * string * Azure.AI.Translation.Text.TransliteratedText * Azure.AI.Translation.Text.TranslatedTextAlignment * Azure.AI.Translation.Text.SentenceBoundaries -> Azure.AI.Translation.Text.TranslationText
Public Shared Function TranslationText (Optional targetLanguage As String = Nothing, Optional text As String = Nothing, Optional transliteration As TransliteratedText = Nothing, Optional alignment As TranslatedTextAlignment = Nothing, Optional sentenceBoundaries As SentenceBoundaries = Nothing) As TranslationText

Parameters

targetLanguage
String

A string representing the language code of the target language.

text
String

A string giving the translated text.

transliteration
TransliteratedText

An object giving the translated text in the script specified by the toScript parameter.

alignment
TranslatedTextAlignment

Alignment information.

sentenceBoundaries
SentenceBoundaries

Sentence boundaries in the input and output texts.

Returns

A new TranslationText instance for mocking.

Applies to