Google Translation API Documentation
A Google Cloud Translation Basic v2 compatible API for translating text, detecting its language, and listing supported languages.
Debug the Translation APITranslate text
In an existing Google Cloud Translation Basic v2 integration, replace translation.googleapis.com with gmapapi.jsonutil.online and use a key issued by this service with the translate permission. You can run the examples below with the public test key DEBUG_KEY_FOR_TESTING.
Translation and detection count toward character quotas. The language list has a separate request quota.
Example request
curl 'https://gmapapi.jsonutil.online/language/translate/v2' \
-H 'Content-Type: application/json' \
--data '{"key":"DEBUG_KEY_FOR_TESTING","q":["Hello"],"target":"zh-CN","format":"text"}'
Request parameters
q- An array of one or more strings to translate.
source- Source language, such as
en. Omit it to detect the language automatically. target- Required target language, such as
zh-CNfor Simplified Chinese orjafor Japanese. format- Use
textfor plain text orhtmlto preserve HTML markup.
Example response
{
"data": {
"translations": [
{"translatedText": "你好", "detectedSourceLanguage": "en"}
]
}
}
Read the first translation from data.translations[0].translatedText.
Detect language
Send the input text in q. Read the first result from data.detections[0][0].language.
curl 'https://gmapapi.jsonutil.online/language/translate/v2/detect' \
-H 'Content-Type: application/json' \
--data '{"key":"DEBUG_KEY_FOR_TESTING","q":["Hello"]}'
Debug language detection
Supported languages
Read available language codes from data.languages. Set the optional target parameter to localize the returned language names.
curl 'https://gmapapi.jsonutil.online/language/translate/v2/languages?key=DEBUG_KEY_FOR_TESTING&target=en'
Debug the language list
Set up translation in SaleSmartly
Add an External Request action to your workflow and pass the translated text to the Send Message action.
Read the SaleSmartly setup guideAPI key usage
Enter the API key you use for requests. Dates follow Beijing time.
Queried key
Enter an API key to see usage.
- Requests
- Successful requests
- Input characters
Character totals count input text from successful requests.
| Date | Requests | Successful requests | Input characters |
|---|
Enter an API key to see usage.
- Requests
| API | Requests |
|---|