Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you send a file to translate, the Beebox will translate according to the configured workflow and automation. By default, the translation will be into all project target languages.

Next to the source file, you can optionally send JSON formatted "instructions" to the Beebox:

  • Specify the target languages of translation. For example: Translate file into French only ("fr").
  • Specify a deadline of translation.
  • Specify text alignment options in case you also sent the translated file version.
  • Specify any meta information to include with files.

Read: When to use instructions?.

...

(PUT) /api/files/file?token=&locale=&folder=&filename={source file name}.beebox

...

The API method, parameters, and result is identical to that for sending source files.

 


Instruction file name and location

The instructions are stored are JSON formatted. Let us suppose the source file is folder\document-200.xml. In that case, the instructions file must be named folder\document-200.xml.beebox . Append “.beebox” to the original file name like in the example below:

To request a translation into one specific target language, send a JSON like below with name "document-200.xml.beebox":

...

Use the standard API call to send/api/files/file?token=...&filename=document-200.xml.beebox&locale=en

 


Instructions format

The JSON may contain one or more of the following options:

Code Block
{
	"deadline": "2015-11-08T23:00:00.0000000Z",
	"locales": "fr-BE",
	"align": { "locales": ["fr-BE"] },
	"metadata": [ 
		{ "id": "url", "value": "http://mine.com/page199.htm", "type": "segment" },
		{ "id": "title", "value": "Introduction page", "type": "segment" }
		],
	"unapproveAll": false,
	"disableMT": false,
	"diableJobs": false
}

 

The options are:

InstructionSample JSON
"deadline"

Specify an ISO formatted deadline. The value may include a time zone indicator. In the example below we use "Z" to indicate the UTC time zone.

Code Block
"deadline": "2015-11-08T23:00:00.0000000Z"

Optional field. If not specified, the source file will not be given a specific deadline for translation.

"deadlineLocal"

Optional.

Specify a deadline in the Beebox server's local time zone. The format must be exactly as in the example below.

Do not use both "deadline" and "dealineLocal" at the same time.

Code Block
"deadline": "2015-06-15T13:00:00"

Optional field. If not specified, the source file will not be given a specific deadline for translation.

"locales"

Specifies one or more target languages for translation. Most content management system connectors send files with one specific target language, like in:

Code Block
"locales": [ "de-DE" ]

Optional field. If not specified, the system assumes that the file requires translation into ALL the project target languages.

"align"

Instructs the Beebox to look for translated files in the Beebox "out" directory. If translated files are found, these will be aligned with the source file for the purpose of pretranslation. The JSON indicates the target languages for which to look for translated files.

Code Block
"locales": [ "de-DE" ]

Optional field. If not specified, the system will not align source and translated files.

This option has a common use case with content management system connectors. Imagine that a user edits translations in the CMS directly. To capture such edits and send to the translation team, you would simply send this to the Beebox: (a) the source page, (b) the edited page, (c) instructions telling the Beebox to align source/edited page. All edits of the user will be extracted by the Beebox and send to the translation team for approval or revision.

"unapproveAll"

Instructs the Beebox to force unapproval of any pretranslations. There is one specific use case for setting this property: Imagine that you retrieve a translated file from the Beebox. The user looks at it and does not like it at all. In that case you can propose an option to send the original file once again to the Beebox (maybe you include the translated file too for alignment) with the property "unapprove" set to true. If you do not set the flag then the Beebox will immediately return to you the very same translated file since the source text did not change and the Beebox already has the translations in its memory. With the flag set, the Beebox will do all pretranslation as well but flag them as unapproved. This means the content goes into the regular human translation workflow once again for editing.

Code Block
"unapproveAll": false

Optional. If not included, no unapproval is enforced.

"metadata"

Permits to include any kind of meta-data with each source file:

Code Block
"metadata": [ 
		{ "id": "url", "value": "http://mine.com/page199.htm", "type": "segment" },
		{ "id": "title", "value": "Introduction page", "type": "segment" }
		]

The properties are:

  • "id": An alphanumeric id for the meta data element
  • "value": The meta data content
  • "type": Must be "segment". Segment meta data is stored with each source segment. Other "type" values are not permitted.

Meta data can be forwarded to Wordbee Translator if you use this system for translation. In that case, you need to opt for segment level data and assign specific IDs: "CustomStr1", "CustomStr2", etc. These are the IDs used in Wordbee Translator for segment level data. Make sure to first configure corresponding segment level custom fields in Wordbee.

Please read this page more information and alternative approaches of adding meta data.

"disableMT"

If true then machine translation is explicitly disabled for this file.

Optional. If not included then MT is enabled if used in the workflow.

"disableJobs"

If true then human workflows (translation, revision...) are explicitly disabled for this file.

Optional. If not included then human work is enabled if used in the workflow.

 

Include Page
Instruction format
Instruction format


Common use cases

Read more about when to use instructions

...

Serialize JSON to UTF-8 when adding to the HTTP request body. 


ADDITIONAL INFORMATION

More information is found at:

Child pages (Children Display)

 

 


 Beebox also supports folder level instruction files: