Class HttpTranslateRpc (2.42.0)

public class HttpTranslateRpc implements TranslateRpc

Inheritance

java.lang.Object > HttpTranslateRpc

Implements

TranslateRpc

Constructors

HttpTranslateRpc(TranslateOptions options)

public HttpTranslateRpc(TranslateOptions options)
Parameter
Name Description
options TranslateOptions

Methods

detect(List<String> texts)

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

Detects the language of the provided texts.

Parameter
Name Description
texts List<String>
Returns
Type Description
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
Name Description
optionMap Map<Option,?>
Returns
Type Description
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
Name Description
texts List<String>
optionMap Map<Option,?>
Returns
Type Description
List<com.google.api.services.translate.model.TranslationsResource>