Dictionary translation

This functionality is available on demand only. Please contact us for gaining access.

Dictionary translation is carried out by sending an HTTP request at http://api.multillect.com/translate/json/1.0/<account-id>, where <account-id> — is a unique identifier for a customer account.

Acceptable methods: GET and POST.
Answer type:
JSON
Answer encoding:
UTF-8

Query options:

Parameter Compulsive Description
method yes Has to be translate/api/dictionary
from no Source language. If this parameter is not present, Multillect attempts to detect the source language automatically. The result of determining the language returns in the "language" in answer.
to yes Target language
text yes Text for translation in UTF-8 (text length must be at least 2 characters)
sig yes Secret key

List of supported languages:

Language Code
Arabic ar
English en
Spanish es
Chinese zh
Kazakh kk
Korean ko
German de
Polish pl
Portuguese pt
Russian ru
Turkish tr
Ukrainian uk
Farsi (Persian) fa
French fr
Hindi hi
Japanese ja

Answer

Response is a JSON-object with such properties:

Property Description
result

Contains an object with the result of the operation or “null” in the case of error

Property Description
dictionary Result of dictionary translation. Is an array of objects with the following properties:
Property Description
text Text of a word
translated_text Translated word
sample_phrases Array containing examples of phrases with this word (may not be included)
part_of_speech Part of speech:
Code Description
N Существительное (noun)
V Глагол (verb)
Adj Прилагательное (adjective)
Adv Наречие (adverb)
Conj Союз (conjunction)
Intj Междометие (interjection)
language Result of language detection
error Contains an object that describes the error or “null” if successful
 
Property Description
code Error code
message Error text

Example

GET http://api.multillect.com/translate/json/1.0/2711024?method=translate/api/translate&from=eng&to=rus&text=browse&sig=38f4c080a05411e6a0328c89a5a1fd3

{
    "result": {
        dictionary: [
            {
                part_of_speech: "V",
                sample_phrases: [
                    "browsing corner"
                ],
                text: "browse",
                translated_text: "просматривать"
            },
            {
                part_of_speech: "N",
                sample_phrases: [
                    "browse button"
                ],
                text: "browse",
                translated_text: "просмотр"
            }
        ],
        "language": {
            "code": null
        }
    }
    "error": null,
    "timestamp": 1478019472,
    "id": null
}