Skip to main content

A project resource can be retrieved from the Delivery API and could be used to find the languages that the project supports and determine which language is the primary language

Properties

NameTypeFormatDescription
idstringThe project identifier, e.g. "movieDb". Found in the project overview screen of the management console.
namestringThe friendly name given to the project.
descriptionstringThe description text given to a project.
supportedLanguagesstring […]An array of all the languages supported by the project.
primaryLanguagestringLanguage codeThe primary language for the project.

Example

TypeScript
// Using TypeScript, or ES Module await syntax
const project = await client.project.get();

console.log(project.name);
console.log(project.primaryLanguage);
console.log(project.supportedLanguages);
JavaScript
// Using Common JS promise callback syntax
client.project.get()
  .then(function(project) {
    console.log(currentProject.name);
    console.log(currentProject.primaryLanguage);
    console.log(currentProject.supportedLanguages);
  });

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request