Custom Translation API
It will send application/www-urlencode data via a GET request to the provided API address:
text: The text/string to be translated
source_language: The language code of the original text zh,en,ja,ko,ru,de,fr,tr,th,vi,ar,hi,hu,es,pt,it / string
target_language: The target language code zh,en,ja,ko,ru,de,fr,tr,th,vi,ar,hi,hu,es,pt,it / string
Expect a JSON format response from the API:
{
code: 0 = on success, a number > 0 represents failure, msg: ok = on success, other values indicate the reason for failure, text: the translated text
}For a free translation API based on Cloudflare and m2m100, see: https://github.com/jianchang512/translate-api
