AptlyStar

Google Translate

Translate text using Google Cloud Translation

使用说明

Translate and detect languages using the Google Cloud Translation API. Supports auto-detection of the source language.

工具

google_translate_text

Translate text between languages using the Google Cloud Translation API. Supports auto-detection of the source language.

输入

参数类型必填描述
apiKeystring是Google Cloud API key with Cloud Translation API enabled
textstring是The text to translate
targetstring是Target language code (e.g., "es", "fr", "de", "ja")
sourcestring否Source language code. If omitted, the API will auto-detect the source language.
formatstring否Format of the text: "text" for plain text, "html" for HTML content
pricingcustom否No description
metadatastring否No description
rateLimitstring否No description

输出

参数类型描述
translatedTextstringThe translated text
detectedSourceLanguagestringThe detected source language code (if source was not specified)

google_translate_detect

Detect the language of text using the Google Cloud Translation API.

输入

参数类型必填描述
apiKeystring是Google Cloud API key with Cloud Translation API enabled
textstring是The text to detect the language of
pricingcustom否No description
metadatastring否No description
rateLimitstring否No description

输出

参数类型描述
languagestringThe detected language code (e.g., "en", "es", "fr")
confidencenumberConfidence score of the detection

On this page