Skip to main content

API - Get translated content

Once you know that a file was translated, you can download it from the Beebox. This operation is equivalent to retrieving the file from the project "OUT\{target locale}" directory.

URL

(GET) /api/files/file?token=&locale=&filename=&folder=

PARAMETERS

Parameters are:

token

The session token obtained when connecting.

locale

The target language. This must be one of the project target languages.

Language codes are ISO 2 letter codes such as “en”, “fr”, “en-GB”, “en-US”, etc.

filename

The relative path of the original file.

  • This can be a simple file name like “myfile.xml”.
  • Or, it can include directories such as “folder1\folder2\myfile.xml”.

Note the use of backslash separators as it is common on Windows systems.

folderThe filename can also include folders, or folder directory can be passed by this param


The file will be retrieved from the project output directory. Example: If you translated “folder1\myfile.xml”, the Spanish translation will be saved to “c:\beebox\{project id}\out\es\folder1\myfile.xml” and retrieved from there.

RESULTS

The method returns the translated file as a binary stream.

If the file does not exist, the method returns an HTTP error status and error details. See HTTP status values.

EXAMPLE

This is how files are stored internally in the Beebox. In the example below the Beebox translated original file "pages\page1.html" into Spanish and French.

CODE
c:\Beebox\{project key}
	\in
		\pages\page1.html
	\out
		\es
			\pages\page1.html
		\fr
			\pages\page1.html

The c:\Beebox root directory may be different in your setup.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.