Interface TranslateRpc

  • All Superinterfaces:
    com.google.cloud.ServiceRpc
    All Known Implementing Classes:
    HttpTranslateRpc

    public interface TranslateRpc
    extends com.google.cloud.ServiceRpc
    • Method Detail

      • listSupportedLanguages

        List<com.google.api.services.translate.model.LanguagesResource> listSupportedLanguages​(Map<TranslateRpc.Option,​?> optionMap)
        Returns a list of the languages supported by Google Translation.
        Parameters:
        optionMap - options to listing language translations
      • detect

        List<List<com.google.api.services.translate.model.DetectionsResourceItems>> detect​(List<String> texts)
        Detects the language of the provided texts.
        Parameters:
        texts - the texts to translate
        Returns:
        a list of lists of detections, one list of detections for each provided text, in order
      • translate

        List<com.google.api.services.translate.model.TranslationsResource> translate​(List<String> texts,
                                                                                     Map<TranslateRpc.Option,​?> optionMap)
        Translates the provided texts.
        Parameters:
        texts - the texts to translate
        optionMap - options to text translation
        Returns:
        a list of resources containing translation information, in the same order of the provided texts