Skip to content

Custom Translation API

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

text: The text/string to be translated.

source_language: The language code of the original text (e.g., zh,en,ja,ko,ru,de,fr,tr,th,vi,ar,hi,hu,es,pt,it/string).

target_language: The language code of the target text (e.g., zh,en,ja,ko,ru,de,fr,tr,th,vi,ar,hi,hu,es,pt,it/string).

Expect the API to return data in JSON format:

{

    code: 0 = success, a number > 0 represents failure, msg: ok = 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