public final class Translate extends MicrosoftTranslatorAPI
apiKey, ENCODING, PARAM_APP_ID, PARAM_FROM_LANG, PARAM_LANGUAGE_CODES, PARAM_LOCALE, PARAM_SENTENCES_LANGUAGE, PARAM_SPOKEN_LANGUAGE, PARAM_TEXT_ARRAY, PARAM_TEXT_SINGLE, PARAM_TO_LANG| Modifier and Type | Method and Description |
|---|---|
static String[] |
execute(String[] texts,
Language to)
Translates an array of texts from an Automatically detected language to another given Language using Microsoft Translator's TranslateArray
service
Note that the Microsoft Translator expects all source texts to be of the SAME language.
|
static String[] |
execute(String[] texts,
Language from,
Language to)
Translates an array of texts from a given Language to another given Language using Microsoft Translator's TranslateArray
service
Note that the Microsoft Translator expects all source texts to be of the SAME language.
|
static String |
execute(String text,
Language to)
Translates text from a given Language to another given Language using Microsoft Translator.
|
static String |
execute(String text,
Language from,
Language to)
Translates text from a given Language to another given Language using Microsoft Translator.
|
buildStringArrayParam, getToken, retrieveIntArray, retrieveString, retrieveStringArr, retrieveStringArr, setClientId, setClientSecret, setContentType, setHttpReferrer, setKey, validateServiceStatepublic static String execute(String text, Language from, Language to) throws Exception
text - The String to translate.from - The language code to translate from.to - The language code to translate to.Exception - on error.public static String execute(String text, Language to) throws Exception
text - The String to translate.to - The language code to translate to.Exception - on error.public static String[] execute(String[] texts, Language from, Language to) throws Exception
texts - The Strings Array to translate.from - The language code to translate from.to - The language code to translate to.Exception - on error.public static String[] execute(String[] texts, Language to) throws Exception
texts - The Strings Array to translate.from - The language code to translate from.to - The language code to translate to.Exception - on error.Copyright © 2013. All Rights Reserved.