Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The message body contains a JSON object:

segmentsTotal segments in scope and query.long

counts

An array of found labels:

  • id: The unique label identifier (number)
  • value: The label value (number)
  • locale: Null if the label is attached to the segment. Otherwise the locale to which the label is attached.
  • segments: Total segments
  • words: Total words (note: this field may not be populated in your platform)
object[]
locales

The list of locales scanned (same as method parameter). Each item has these elements

  • v: The language code such as "en-US", "fr"...
  • t: The language name
object[]
labels

The list of all the labels defined in the platform. To configure labels in Wordbee Translator go to "Settings" and then "Labels".

See Label (Object) for the properties included with each label.

object[]

...

See this example:

Code Block
{
  "segments": 6510,
  "counts": [
    {
      "id": 1,
      "value": 0,
      "locale": null,
      "segments": 626,
      "words": 3465
    },
    {
      "id": 1,
      "value": 1,
      "locale": null,
      "segments": 8,
      "words": 56
    },
    {
      "id": 1,
      "value": 1,
      "locale": "en",
      "segments": 60,
      "words": 340
    },
    {
      "id": 2,
      "value": 3,
      "locale": null,
      "segments": 26,
      "words": 132
    }
  ],
  "labels": [
    {
      "id": 2,
      "name": "Usefulness",
      "isSticky": false,
      "isStickyInLists": false,
      "options": [
        {
          "name": "High quality",
          "value": 4,
          "htmlColor": "#92D050"
        },
        {
          "name": "Medium quality",
          "value": 1,
          "htmlColor": "#FFCC00"
        },
        {
          "name": "Low quality",
          "value": 2,
          "htmlColor": "#CC6600"
        },
        {
          "name": "Do not use",
          "value": 3,
          "htmlColor": "#FF4F4F"
        }
      ]
    },
    {
      "id": 1,
      "name": "Errors",
      "isSticky": false,
      "isStickyInLists": false,
      "options": [
        {
          "name": "Grammar",
          "value": 0,
          "htmlColor": "#92D050"
        },
        {
          "name": "Terminology",
          "value": 1,
          "htmlColor": "#d0d0d0"
        }
      ]
    }
  ],
  "locales": [
    {
      "v": "en",
      "t": "Anglais"
    }
  ]
}

...