func TranslateTextHighLevel(service TranslateService, text, language string) (string, error)
TranslateTextHighLevel translates text to the given language using the provided service.
func TranslateTextLowLevel(call TranslateTextCall) (string, error)
TranslateTextLowLevel executes the call and returns the translated text.
TranslateService is a facade of a `translate.Service`, specifically used to for translating text.
type TranslateService interface { TranslateText(text, language string) (string, error) }
func NewTranslateService(ctx context.Context, opts ...option.ClientOption) TranslateService
NewTranslateService creates a TranslateService.
TranslateTextCall is used to translate text and is fullfilled by a `translate.ProjectsTranslateTextCall`.
type TranslateTextCall interface { Do(opts ...googleapi.CallOption) (*translate.TranslateTextResponse, error) }