Class HttpTranslateRpc (2.22.0)

public class HttpTranslateRpc implements TranslateRpc

Inheritance

java.lang.Object > HttpTranslateRpc

Implements

TranslateRpc

Constructors

HttpTranslateRpc(TranslateOptions options)

public HttpTranslateRpc(TranslateOptions options)
Parameter
NameDescription
optionsTranslateOptions

Methods

detect(List<String> texts)

public List<List<DetectionsResourceItems>> detect(List<String> texts)

Detects the language of the provided texts.

Parameter
NameDescription
textsList<String>
Returns
TypeDescription
List<List<com.google.api.services.translate.model.DetectionsResourceItems>>

listSupportedLanguages(Map<TranslateRpc.Option,?> optionMap)

public List<LanguagesResource> listSupportedLanguages(Map<TranslateRpc.Option,?> optionMap)

Returns a list of the languages supported by Google Translation.

Parameter
NameDescription
optionMapMap<Option,?>
Returns
TypeDescription
List<com.google.api.services.translate.model.LanguagesResource>

translate(List<String> texts, Map<TranslateRpc.Option,?> optionMap)

public List<TranslationsResource> translate(List<String> texts, Map<TranslateRpc.Option,?> optionMap)

Translates the provided texts.

Parameters
NameDescription
textsList<String>
optionMapMap<Option,?>
Returns
TypeDescription
List<com.google.api.services.translate.model.TranslationsResource>