Dynamically translate text between thousands of language pairs
Install 21 Beta:
$ curl https://21.co | sh
Create a 21 account.
$ 21 buy "jasonwalsh/21-translator/?q=the quick brown fox jumped over the lazy dog&target=es" -o out
$ cat out
"El zorro marrón rápido saltó sobre el perro perezoso"
-o
flag is required for this operation. If the flag is not specified, the output of the request contains escaped UTF-8
text.
Parameter | Description | Required |
---|---|---|
q |
The input text to translate. Repeat this parameter to perform, translation operations on multiple text inputs. | ✔️ |
target |
The language to use for translation of the input text, set, to one of the language codes listed in Language Support. | ✔️ |
format |
The format of the source text, in either HTML (default) or, plain-text. A value of html indicates HTML and a value of text indicates, plain-text. | ✖️ |
source |
The language of the source text, set to one of the language, codes listed in Language Support. If the source language is not specified, the API will attempt to detect, the source language automatically and return it within the response. | ✖️ |
model |
The translation model. Can be either base to use the Phrase-Based, Machine Translation (PBMT) model, or nmt to use the Neural Machine Translation, (NMT) model. If omitted, then nmt is used. | ✖️ |