Skip to content

Custom Translation API

A GET request will be sent to the provided API address with application/www-urlencode data:

text: The text/string to be translated

source_language: Original text language code zh,en,ja,ko,ru,de,fr,tr,th,vi,ar,hi,hu,es,pt,it/string

target_language: Target text language code zh,en,ja,ko,ru,de,fr,tr,th,vi,ar,hi,hu,es,pt,it/string

Expect a JSON-formatted response from the API:

{
    code: 0 = success, >0 indicates failure, msg: ok = success, other values indicate failure reason, text: translated text
}

For a free translation API based on Cloudflare and M2M100, see: https://github.com/jianchang512/translate-api