Class HttpTranslateRpc

    • Constructor Detail

    • Method Detail

      • detect

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

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

        public List<com.google.api.services.translate.model.TranslationsResource> translate​(List<String> texts,
                                                                                            Map<TranslateRpc.Option,​?> optionMap)
        Description copied from interface: TranslateRpc
        Translates the provided texts.
        Specified by:
        translate in interface TranslateRpc
        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