This API is used for text translation (HTML payload is also supported) against an external service.
Translate a specific payload to requested language.
{
    mt:   "Translate",
    html: "Payload we want translated",
    langDst: "de"
}
    
    | string mt | message type [mandatory] | 
| string html | payload to be translated [mandatory] | 
| string langSrc | 2 letter source language. If not set, the language will be detected. [optional] | 
| string langDst | 2 letter target language. If not set, the current myApps language will be used. [optional] | 
translate="no". (Example: "Bananas are <span translate="no">yellow</span> fruits.){
    mt:        "TranslateResult",
    html:      "Nutzdaten, die übersetzt werden sollen",
    langSrc:   "en"
    langDst:   "de"
    unchanged: false
}
    | string mt | message type (is "TranslateResult") | 
| string html | translated payload | 
| string langSrc | 2 letter source language | 
| string langDst | 2 letter target language | 
| bool unchanged | labelling if the payload in html have been changed | 
{
    mt:    "TranslateResult",
    html:  "Error: [English error message which can be shown to the User]",
    error: true
}
    | string mt | message type (is "TranslateResult") | 
| string html | English error message which can be shown to the User | 
| bool error | labelling whether error was send. Only sent if true [optional] | 
Translate a specific payload to all possible languages.
{
    mt:   "TranslateAll",
    html: "Christmas Tree"
}
    | string mt | message type (is "TranslateAll") [mandatory] | 
| string html | payload to be translated [mandatory] | 
| string langSrc | 2 letter source language [optional] | 
{
    mt:     "TranslateAllResult",
    html:   [
        { langSrc: "en", langDst: "bg", html: "Коледна елха" },
        { langSrc: "en", langDst: "cs", html: "Vánoční stromek" },
        { langSrc: "en", langDst: "da", html: "Juletræ" },
        { langSrc: "en", langDst: "de", html: "Weihnachtsbaum" },
        { langSrc: "en", langDst: "el", html: "Χριστουγεννιάτικο δέντρο" },
        ...
    ]
}
    | string mt | message type (is "TranslateAllResult") | 
| array html | array of translated payload for all languages | 
Get all possible target languages.
{
    mt:   "GetTargetLanguages"
}
    | string mt | message type (is "GetTargetLanguages") | 
{
    mt:        "GetTargetLanguagesResult",
    languages: [
        { language: "bg", name: "Bulgarian" },
        { language: "cs", name: "Czech" },
        { language: "da", name: "Danish" },
        { language: "de", name: "German" },
        { language: "el", name: "Greek" },
        ...
    ]
}
    | string mt | message type (is "GetTargetLanguagesResult") | 
| array languages | array of all supported target languages | 
Detect langiage from given string.
{
    mt:   "DetectLanguage",
    html: "Payload that should be detected"
}
    | string mt | message type (is "DetectLanguage") | 
| string html | payload | 
{
    mt:   "DetectLanguageResult",
    lang: "en"
}
    | string mt | message type (is "DetectLanguageResult") | 
| array lang | 2-letter detected language, empty if no match | 
| bool error | labelling whether error was send. Only sent if true [optional] | 
        You can consume the API com.innovaphone.translate and send translation request to them. Inside the callback you can access the translated version via recv.msg.html
    
var translateApi = start.consumeApi("com.innovaphone.translate");
translateApi.sendSrc({ mt: "translate", html: "<div>Hello World!</div>", lang: "de" }, translateApi.providers[0], function (recv) {
    console.log('translated text: '+recv.msg.html);
});