Skip to main content

API - Get project information

The purpose of this method is to retrieve and check the languages of the connected Beebox project. This is very important since the languages of your content (CMS, database, etc.) and the Beebox project languages must match.

When to use: A CMS connector checks languages in the page where the user configures the connection to the Beebox. You would get the languages with the present method and make sure that the languages correspond to those in the CMS. The source language must match or you will not be able to send any content for translation. The target language codes should match too or you can only get translations for those languages that do match.

URL

(GET) /api/details?token=

PARAMETERS

Parameters are:

token

The session token obtained when connecting.


RESULTS

The method returns JSON and HTTP status 200. Other HTTP status values indicate an error.

The JSON properties are:

PropertyDescription
sourceLocaleISO source language code. About language codes.
sourceLocaleNameEnglish name.
sourceLocaleRTLBoolean. True if language is right-to-left (Arabic, Hebrew ...)
targetLocalesArray with the project target language codes.
targetLocaleNamesArray with the English names of target languages.
targetLocaleItemsArray combining codes and names, see example below.
extensionsThe file extensions that this Beebox project accepts for translations. The accepted file formats are a configuration of the Beebox project.

 

Note: If you connect using administrator credentials, you will obtain all project details.

EXAMPLE

A typical result may look like:

CODE
{
	"sourceLocale":"en",
	"sourceLocaleName":"English (en)",
	"sourceLocaleRTL":false,
	"targetLocales":["fr","de"],
	"targetLocaleNames":["French (fr)","German (de)"],
	"targetLocaleItems":[{"v":"fr","t":"French (fr)"},{"v":"de","t":"German (de)"}],
	"extensions": [".htm",".html",".htmls",".json",".xml"]
}

 

 

JavaScript errors detected

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

If this problem persists, please contact our support.