|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.GoogleAPI
com.google.api.translate.Translate
public final class Translate
Makes the Google Translate API available to Java applications.
Field Summary |
---|
Fields inherited from class com.google.api.GoogleAPI |
---|
ENCODING, referrer |
Constructor Summary | |
---|---|
Translate()
|
Method Summary | |
---|---|
static String[] |
execute(String[] text,
Language[] from,
Language[] to)
Translates text from a given Language to another given Language using Google Translate. |
static String[] |
execute(String[] text,
Language from,
Language to)
Translates an array of text Strings from a given Language to another given Language using Google Translate. |
static String |
execute(String text,
Language from,
Language to)
Translates text from a given Language to another given Language using Google Translate. |
static String[] |
execute(String text,
Language from,
Language[] to)
Translates a String from a given Language to an Array of Languages using Google Translate. |
static String |
translate(String text,
Language from,
Language to)
Deprecated. Replaced by execute() . |
Methods inherited from class com.google.api.GoogleAPI |
---|
retrieveJSON, retrieveJSON, setHttpReferrer, validateReferrer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Translate()
Method Detail |
---|
public 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 from, Language to) throws Exception
text
- The array of Strings 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 from, Language[] to) throws Exception
text
- The String to translate.from
- The language code to translate from.to
- The array of Languages to translate to.
Exception
- on error.public static String[] execute(String[] text, Language[] from, Language[] to) throws Exception
text
- The array of Strings to translate.from
- The array of Language codes to translate from.to
- The array of Language codes to translate to.
Exception
- on error.@Deprecated public static String translate(String text, Language from, Language to) throws Exception
execute()
.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |