CMS Tool API schema
Public API version 1.4.60.
Translation Phrases
The website's phrases: the text found in its pages, theme and prompts, each of which can be translated into the website's alternative languages with the translations endpoint.
Endpoint URL
https://api.cms-tool.net/api/translations_phrases
/api/translations_phrases
Read the website's phrases, the text found in its content that translations translate, and find new ones.
GET
List the phrases with the languages each is translated into, or retrieve one by appending its ID to the path. untranslated true lists the phrases with no translation in any language. Needs the translations_phrases:read scope.
Query parameters
| Name | Type | Example | Notes |
|---|---|---|---|
keywords | text | example | Filter results by keywords. |
objectType | text | example | Filter results by object type. |
objectId | int | 123 | Filter results by object id. |
untranslated | boolean | true | Filter results to phrases with no translation in the language yet. Accepts true or 1. |
offset | int | 123 | Skip this many matching records before returning results. |
pageSize | int | 123 | Limit the number of records returned; accepted values are 1 through 999, with 200 used otherwise. |
POST
FindNewPhrases true finds the text of the website's pages, theme and prompts and adds the phrases it does not have yet, as Find New Phrases in the CMS. Nothing is removed. Needs the translations_phrases:write scope and the seo permission.
Request content type: application/json
Request body fields
| Name | Type | Example | Notes |
|---|---|---|---|
FindNewPhrases | boolean | true | Find the text of the website's pages, theme and prompts, and add the phrases the website does not have yet. Accepts true or 1. |
Data definitions
| Field | Type | Description | Format | Example |
|---|---|---|---|---|
phrase | text | Text exactly as it appears on the website in its primary language. | ||
languages | text | Codes of the languages the phrase has a translation in, separated by commas. Null when it has none. | ||
object_type | text | Where the phrase was found: Template (the whole website, and phrases added through the API), Page, Prompt, Blog, Cat or Event. | ||
id | int | ID of the phrase, as the translations endpoint uses it. | ||
object_id | int | ID of the page or other item the phrase was found in. |
Usage instructions and examples
Sample object
{"id": 1234, "phrase": "Opening hours", "object_type": "Page", "object_id": 112137, "languages": "fr,de"}Machine-readable documentation
This documentation is also available as JSON or Markdown at the same URL. Request JSON with Accept: application/json or Markdown with Accept: text/markdown.