public interface TranslateRpc extends ServiceRpcImplements
com.google.cloud.ServiceRpcMethods
detect(List<String> texts)
public abstract List<List<DetectionsResourceItems>> detect(List<String> texts)Detects the language of the provided texts.
| Parameter | |
|---|---|
| Name | Description |
texts |
List<String>the texts to translate |
| Returns | |
|---|---|
| Type | Description |
List<List<com.google.api.services.translate.model.DetectionsResourceItems>> |
a list of lists of detections, one list of detections for each provided text, in order |
listSupportedLanguages(Map<TranslateRpc.Option,?> optionMap)
public abstract List<LanguagesResource> listSupportedLanguages(Map<TranslateRpc.Option,?> optionMap)Returns a list of the languages supported by Google Translation.
| Parameter | |
|---|---|
| Name | Description |
optionMap |
Map<Option,?>options to listing language translations |
| Returns | |
|---|---|
| Type | Description |
List<com.google.api.services.translate.model.LanguagesResource> |
|
translate(List<String> texts, Map<TranslateRpc.Option,?> optionMap)
public abstract List<TranslationsResource> translate(List<String> texts, Map<TranslateRpc.Option,?> optionMap)Translates the provided texts.
| Parameters | |
|---|---|
| Name | Description |
texts |
List<String>the texts to translate |
optionMap |
Map<Option,?>options to text translation |
| Returns | |
|---|---|
| Type | Description |
List<com.google.api.services.translate.model.TranslationsResource> |
a list of resources containing translation information, in the same order of the provided texts |