Bing Translator Web Service
Bing Translator Web Service / All Operations Resource Group / /V2/Soap.svc/GetTranslations (Method)
In This Topic
    Method/V2/Soap.svc/GetTranslations
    In This Topic
    Description
    Retrieves an array of translations for a given language pair from the store and the MT engine. GetTranslations differs from Translate as it returns all available translations.
    Request (LanguageService_GetTranslations_InputMessage)

    The request body is of type GetTranslations.

    Request Body Parameters

    NameDescriptionData Type
     xml:string
     xml:string
     xml:string
     xml:string
     xml:int
     TranslateOptions
    User Element Uri Element State Element ReservedFlags Element ProfanityAction Element IncludeMultipleMTAlternatives Element GenderTo Element GenderFrom Element ContentType Element Category Element Sequence options Element maxTranslations Element to Element from Element text Element appId Element Sequence GetTranslations Element

    Overview

    Sequence
    appId optional xs:string
    A string containing "Bearer" + " " + access token.
    text optional xs:string
    A string representing the text to split into sentences. The size of the text must not exceed 10000 characters.
    from optional xs:string
    A string containing the language code of the source language. Must be a valid culture name.
    to optional xs:string
    A string containing the language code of the target language. Must be a valid culture name.
    maxTranslations optional xs:int
    An int representing the maximum number of translations to return.
    options optional TranslateOptions Complex Type
    A TranslateOptions object which contains the values listed below. They are all optional and default to the most common settings.
    • Category: A string containing the category (domain) of the translation. Defaults to "general".
    • ContentType: A string containing the type of content. Either "text/html" or "text/plain". Defaults to "text/plain".
    • Uri: A string containing the content location of this translation.
    • User: A string used to track the originator of the submission.
    • State: User state to help correlate request and response. The same contents will be returned in the response.
    Sequence
    Category optional xs:string
    A string containing the category (domain) of the translation. Defaults to "general".
    ContentType optional xs:string
    A string containing the type of content. Either "text/html" or "text/plain". Defaults to "text/plain".
    GenderFrom optional xs:string
    GenderTo optional xs:string
    IncludeMultipleMTAlternatives optional xs:boolean
    ProfanityAction optional xs:string
    ReservedFlags optional xs:string
    State optional xs:string
    User state to help correlate request and response. The same contents will be returned in the response.
    Uri optional xs:string
    A string containing the content location of this translation.
    User optional xs:string
    A string used to track the originator of the submission.
    Response (LanguageService_GetTranslations_OutputMessage)

    The response body is of type GetTranslationsResponse.

    A GetTranslationsResponse containing the following values:
    • Translations: An array of matches found, stored in TranslationMatch (see below) objects. The translations may include slight variants of the original text (fuzzy matching). The translations will be sorted: 100% matches first, fuzzy matches below.
    • From: If the method did not specify a From language, this will be the result of auto language detection. Otherwise it will be the given From language.
    • State: User state to help correlate request and response. Contains the same value as given in the TranslateOptions parameter.

    Response Body Parameters

    NameDescriptionData Type
     GetTranslationsResponse
    TranslationMatch Element Sequence Translations Element State Element From Element Sequence GetTranslationsResult Element Sequence GetTranslationsResponse Element

    Overview

    Sequence
    Sequence
    From optional xs:string
    If the method did not specify a From language, this will be the result of auto language detection. Otherwise it will be the given From language.
    State optional xs:string
    User state to help correlate request and response. Contains the same value as given in the TranslateOptions parameter.
    Translations optional ArrayOfTranslationMatch Complex Type
    An array of matches found, stored in TranslationMatch (see below) objects. The translations may include slight variants of the original text (fuzzy matching). The translations will be sorted: 100% matches first, fuzzy matches below.
    Sequence
    Sequence
    Count xs:int
    The number of times this translation with this rating has been selected. The value will be 0 for the automatically translated response.
    Error optional xs:string
    If an error has occurred for a specific input string, the error code is stored. Otherwise the field is empty.
    MatchDegree xs:int
    The system matches input sentences against the store, including inexact matches. MatchDegree indicates how closely the input text matches the original text found in the store. The value returned ranges from 0 to 100, where 0 is no similarity and 100 is an exact case sensitive match.
    MatchedOriginalText optional xs:string
    Original text that was matched for this result. Only returned if the matched original text was different than the input text. Used to return the source text of a fuzzy match. Not returned for Microsoft Translator results.
    Rating xs:int
    Indicates the authority of the person making the quality decision. Machine Translation results will have a rating of 5. Anonymously provided translations will generally have a rating of 1 to 4, whilst authoritatively provided translations will generally have a rating of 6 to 10.
    TranslatedText xs:string
    The translated text.
    See Also