TranslateQueryParamProperties interface
Properties
allow |
Specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. Possible values are: true (default) or false. allowFallback=false specifies that the translation should only use systems trained for the category specified by the request. If a translation for language X to language Y requires chaining through a pivot language E, then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. If no system is found with the specific category, the request will return a 400 status code. allowFallback=true specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. |
category | A string specifying the category (domain) of the translation. This parameter is used to get translations from a customized system built with Custom Translator. Add the Category ID from your Custom Translator project details to this parameter to use your deployed customized system. Default value is: general. |
from | Specifies the language of the input text. Find which languages are available to translate from by looking up supported languages using the translation scope. If the from parameter isn't specified, automatic language detection is applied to determine the source language. You must use the from parameter rather than autodetection when using the dynamic dictionary feature. Note: the dynamic dictionary feature is case-sensitive. |
from |
Specifies the script of the input text. |
include |
Specifies whether to include alignment projection from source text to translated text. Possible values are: true or false (default). |
include |
Specifies whether to include sentence boundaries for the input text and the translated text. Possible values are: true or false (default). |
profanity |
Specifies how profanities should be treated in translations. Possible values are: NoAction (default), Marked or Deleted. |
profanity |
Specifies how profanities should be marked in translations. Possible values are: Asterisk (default) or Tag. |
suggested |
Specifies a fallback language if the language of the input text can't be identified. Language autodetection is applied when the from parameter is omitted. If detection fails, the suggestedFrom language will be assumed. |
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. |
to | Specifies the language of the output text. The target language must be one of the supported languages included in the translation scope. For example, use to=de to translate to German. It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. For example, use to=de&to=it to translate to German and Italian. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request |
to |
Specifies the script of the translated text. |
Property Details
allowFallback
Specifies that the service is allowed to fall back to a general system when a custom system doesn't exist. Possible values are: true (default) or false.
allowFallback=false specifies that the translation should only use systems trained for the category specified by the request. If a translation for language X to language Y requires chaining through a pivot language E, then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. If no system is found with the specific category, the request will return a 400 status code. allowFallback=true specifies that the service is allowed to fall back to a general system when a custom system doesn't exist.
allowFallback?: boolean
Property Value
boolean
category
A string specifying the category (domain) of the translation. This parameter is used to get translations from a customized system built with Custom Translator. Add the Category ID from your Custom Translator project details to this parameter to use your deployed customized system. Default value is: general.
category?: string
Property Value
string
from
Specifies the language of the input text. Find which languages are available to translate from by looking up supported languages using the translation scope. If the from parameter isn't specified, automatic language detection is applied to determine the source language.
You must use the from parameter rather than autodetection when using the dynamic dictionary feature. Note: the dynamic dictionary feature is case-sensitive.
from?: string
Property Value
string
fromScript
Specifies the script of the input text.
fromScript?: string
Property Value
string
includeAlignment
Specifies whether to include alignment projection from source text to translated text. Possible values are: true or false (default).
includeAlignment?: boolean
Property Value
boolean
includeSentenceLength
Specifies whether to include sentence boundaries for the input text and the translated text. Possible values are: true or false (default).
includeSentenceLength?: boolean
Property Value
boolean
profanityAction
Specifies how profanities should be treated in translations. Possible values are: NoAction (default), Marked or Deleted.
profanityAction?: ProfanityAction
Property Value
profanityMarker
Specifies how profanities should be marked in translations. Possible values are: Asterisk (default) or Tag.
profanityMarker?: ProfanityMarker
Property Value
suggestedFrom
Specifies a fallback language if the language of the input text can't be identified. Language autodetection is applied when the from parameter is omitted. If detection fails, the suggestedFrom language will be assumed.
suggestedFrom?: string
Property Value
string
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.
textType?: string
Property Value
string
to
Specifies the language of the output text. The target language must be one of the supported languages included in the translation scope. For example, use to=de to translate to German. It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string. For example, use to=de&to=it to translate to German and Italian. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request
to: string
Property Value
string
toScript
Specifies the script of the translated text.
toScript?: string
Property Value
string