"MicrosoftTranslator" (Service Connection)

Translate text with the Microsoft Translator API

Connecting & Authenticating

ServiceConnect["MicrosoftTranslator"] creates a connection to the Microsoft Translator API.
Use of this connection requires internet access and a Microsoft Translator API account.

Requests

ServiceExecute["MicrosoftTranslator","request",params] sends a request to the Microsoft Translator API, using parameters params. The following give possible requests.

Translate Text

Request:

"Translate" retrieves the best translation of a given text

Parameters:
  • "Text"(required)text or list of texts to translate
    "From"Nonesource language
    "To"(required)target language
    "LanguageRules"Falseshow source language(s) in result
  • Request:

    "GetTranslations" retrieve a set of translations of a given text

    Parameters:
  • "Text"(required)text to translate
    "From"(required)source language
    "To"(required)target language
    "MaxTranslations"(required)maximum number of translations to return
  • Request:

    "LanguageList" list all supported language codes

    "LanguageEntityList" list all supported language entities

    Examples

    Basic Examples  (4)

    Create a new connection:

    In[1]:=
    Click for copyable input
    Out[1]=

    Get all available language codes:

    In[1]:=
    Click for copyable input
    Out[1]=

    Translate text:

    In[1]:=
    Click for copyable input
    Out[1]=
    In[2]:=
    Click for copyable input
    Out[2]=

    If not specified, source languages are detected automatically:

    In[1]:=
    Click for copyable input
    Out[1]=
    In[2]:=
    Click for copyable input
    Out[2]=