Get the translations of a document, page, or folder in a channel. Translations of the content item are looked up in the other channels of the same translation channel group.

When requesting a folder, translations of the 1st level children (documents, pagers, folders) of the folder can be requested via parameter.

When requesting content, translation suggestions for the content can be requested via parameter. The suggestions are based on the relative path of the content. The relative content path is looked up in the other channels of the same channel group. If any content items in the other channels match the given relative path, then they are proposed as translation suggestions.

getTranslations(environment, xAuthToken, '/content/documents/english/banners/banner-a', true, 'all', 'detailed')
.then(response => console.log(response.data))
.catch(error => console.error(error));
  • Parameters

    • environment: string

      Environment name: https://{{environment}}.bloomreach.io

    • xAuthToken: string

      BrX API Token

    • path: string

      Path of the content. This is the absolute path to the content, including the content name

    • OptionalincludeDocuments: boolean = false

      whether to include the translations of the 1st level children (documents, pages, folders) of the folder in case the content is a folder

    • Optionalstatus: string = 'linked'

      to filter the translations by their status. options are 'linked' (show only existing translations), 'suggested' (show only translation suggestions), 'all' (show both existing translations and translation suggestions)

    • Optionalview: string = 'simple'

      whether the response payload should have a detailed view of the translations. options are 'detailed' (show extra information such as the type, locale and status of the content), 'simple' (works only when status is selected as 'suggested', shows the list of translations suggestions only with their paths that can be copy/pasted to link service as a request)

    Returns AxiosPromise