This method returns the configuration of the Instant Translation tool. This configuration contains the parameters needed to submit translation requests:
- List of translation options. Let's user choose the type of content such as "Medical", "Technical", "Marketing"...
- The available source and target languages for translation.
- Various translation options a user can choose from.
- The supported file formats such as Word, Excel, HTML, XML etc.
- The maximum file size.
- Options for requesting human post edits of machine translations.
- Etc.
All these parameters are freely configurable by the administrator of the Wordbee Translator platform (to which the user belongs).
Warning |
---|
Keep in mind that the administrator may make changes at any time. You should therefore retrieve this configuration each time prior to preparing new translation requests. |
URL
(GET) /api/it/configuration?token=&option=
PARAMETERS
Parameters are:
token | The session token obtained when connecting. |
option | Mandatory number. This is the "translation option" for which you request the configuration. The option is an index into the list of all available translation options. If this is the first time you call the API simply pass 0, to get the first (default) option. The resulting JSON includes the list of all the available options. If a user then selects, let's say the third option, you would call this method again with &option=2 (0 = first option, 1 = second, ...). If you indicate an invalid option, the system will use 0 and not return an error! |
RESULTS
An HTTP status of 200 indicates success. Other HTTP status values indicate an error.
The method returns a JSON object:
option | The option (0, 1, ...) for which this JSON contains the configuration. |
options | A JSON array of all available options. There is always at least one option. Example: "options": ["Default", "Technical", "Marketing"] The "option" is the zero-based index into this array. |
locales | Specifies the available languages. See description further down. |
maxFileSizeMB | The maximum file size in megabytes for translation requests. You should always prevent a user to submit any files exceeding this limit. The API itself will also check the limit. |
formats | Specifies the supported file formats. See description further down. |
peEnabled | Boolean. Specifies if user can request a human post editing (improvement) of a machine translation. |
peTermsUrl | Used when submitting post edit requests. If not null then this is the URL to view usage Terms & Conditions. Before a user requests a post edit of a machine translated file, the user must be asked to navigate to this URL. For example, in your user interface you would add a checkbox like: [ ] I have read and agree with the Terms & Conditions. If the property is null then the user does not need to accept any terms and conditions. |
peDeadlineMinLeadHours | Used when submitting post edit requests. If the user selects a deadline it must be at least this number of hours into the future. |
peDeadlineMandatory | Used when submitting post edit requests. If not null then the user must choose a deadline for the work. If null then the choice of a deadline is optional. |
Locales node
The "locales" node contains these properties:
all | A JSON array with all language codes and print names. Use this information to display language names. Example:
| ||
anytoany | Indicates how source and target language combinations are stored in this JSON.
In both cases, the language selector would look the same: | ||
src trg | Applies if "anytoany" is true. Both "src" and "trg" are the supported source and target language codes, respectively. And the user can translate from any source into any target language. Example:
| ||
srctrg | Applies if "anytoany" is false. Example:
Here the user can choose from two source languages: English (en) and German (de). English can be translated into French and German. German can be translated into English. No other combinations are permitted. |
REMARKS
Question: My request disappeared. Why?
It may happen that the request you ask for does not show up in the result list.
In that case the request was removed from the system:
- Removed by the user from the Wordbee web interface
- Removed by a platform manager or administrator
- Removed because it was too old
You should consider such requests cancelled.
EXAMPLE
We ask for the status of requests 39 and 40 using this URL:
(GET) /api/it/requests?token=&ids=39,40
The result is:
Code Block |
---|
{
"requests": [
{
"id": 39,
"ready": true,
"status": "Finished",
"fname": "My Sample File.docx",
"src": "en",
"srct": "English",
"trg": "fr",
"trgt": "French",
"dt": "2015-05-06T08:00:58.56Z",
"segs": 42,
"words": 372,
"chars": 2184,
"wordsMT": 300,
"wordsTM100": 72,
"wordsTM110": 0,
"wordsTMFuzzy": 0,
"pe_status": null,
"pe_ready": false,
"pe_url": null
}
]
} |
Note: Request 40 does not exist and is therefore not in the list.