TranslateInputItem Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| 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. |
| TranslateInputItem(String, IEnumerable<TranslationTarget>, String, String, Nullable<TextType>) |
Initializes a new instance of TranslateInputItem with optional parameters. |
TranslateInputItem(String, IEnumerable<TranslationTarget>)
- Source:
- TranslateInputItem.cs
- Source:
- TranslateInputItem.cs
Initializes a new instance of TranslateInputItem.
public TranslateInputItem(string text, System.Collections.Generic.IEnumerable<Azure.AI.Translation.Text.TranslationTarget> translationTargets);
new Azure.AI.Translation.Text.TranslateInputItem : string * seq<Azure.AI.Translation.Text.TranslationTarget> -> Azure.AI.Translation.Text.TranslateInputItem
Public Sub New (text As String, translationTargets As IEnumerable(Of TranslationTarget))
Parameters
- text
- String
Text to translate.
- translationTargets
- IEnumerable<TranslationTarget>
Translation target parameters.
Exceptions
text or translationTargets is null.
Applies to
TranslateInputItem(String, TranslationTarget, String, String, Nullable<TextType>)
- Source:
- TranslateInputItem.cs
- Source:
- TranslateInputItem.cs
Initializes a new instance of TranslateInputItem with a single translation target.
public TranslateInputItem(string text, Azure.AI.Translation.Text.TranslationTarget target, string language = default, string script = default, Azure.AI.Translation.Text.TextType? textType = default);
new Azure.AI.Translation.Text.TranslateInputItem : string * Azure.AI.Translation.Text.TranslationTarget * string * string * Nullable<Azure.AI.Translation.Text.TextType> -> Azure.AI.Translation.Text.TranslateInputItem
Public Sub New (text As String, target As TranslationTarget, Optional language As String = Nothing, Optional script As String = Nothing, Optional textType As Nullable(Of TextType) = Nothing)
Parameters
- text
- String
Text to translate.
- target
- TranslationTarget
Translation target parameter.
- 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.
- script
- String
Specifies the script of the input text.
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.
Exceptions
text or target is null.
Applies to
TranslateInputItem(String, IEnumerable<TranslationTarget>, String, String, Nullable<TextType>)
- Source:
- TranslateInputItem.cs
- Source:
- TranslateInputItem.cs
Initializes a new instance of TranslateInputItem with optional parameters.
public TranslateInputItem(string text, System.Collections.Generic.IEnumerable<Azure.AI.Translation.Text.TranslationTarget> targets, string language = default, string script = default, Azure.AI.Translation.Text.TextType? textType = default);
new Azure.AI.Translation.Text.TranslateInputItem : string * seq<Azure.AI.Translation.Text.TranslationTarget> * string * string * Nullable<Azure.AI.Translation.Text.TextType> -> Azure.AI.Translation.Text.TranslateInputItem
Public Sub New (text As String, targets As IEnumerable(Of TranslationTarget), Optional language As String = Nothing, Optional script As String = Nothing, Optional textType As Nullable(Of TextType) = Nothing)
Parameters
- text
- String
Text to translate.
- targets
- IEnumerable<TranslationTarget>
Translation target parameters.
- 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.
- script
- String
Specifies the script of the input text.
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.
Exceptions
text or targets is null.