Translations

API for communication with ZBOS by Zora Robotics.

Channels

zbos/translations/get

PUB Get translations

Get translations for the provided category and language. You have two ways to get the translations: either pass the category + the corresponding keys, or only pass the keys, but prefix each one with the category and a dot. Eg: \{category}.\{key}

Channel tags
  • Translations

GetTranslationsRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

category

string

Optional when using the dot notation in the translations keys.

Any

language

string

ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

translation_keys

array (string)

Optional if the category is set. In that case it will return all translations for that category.

Any

Examples of payload
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US"
}
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US",
  "translation_keys": [
    "translation_key_1",
    "translation_key_2"
  ]
}
{
  "key": "abc",
  "language": "en-US",
  "translation_keys": [
    "category_1.translation_key_1",
    "category_1.translation_key_2"
  ]
}

zbos/translations/get/response/\{key}

PUB Response: Get translations

Channel tags
  • Translations

GetTranslationsResponse
Payload

Name

Type

Description

Accepted values

translations

object

Any

Examples of payload
{
  "translations": {
    "translation_key_1": "Translation 1",
    "translation_key_2": "Translation 2"
  },
  "valid": true
}

zbos/translations/request

PUB Request translation registrations

Request all translation providers to register their translations using the topics below.

Channel tags
  • Translations

EmptyMessage

Empty message

zbos/translations/add

PUB Add translations

Add translations with their default values. These default values will be used as long as they are not updated via zbos/translations/update

Channel tags
  • Translations

AddTranslationsRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

category

string

Any

language

string

ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

file

string

Optional. Use either translations or file. The file location should be a path accessible for the RAIL. The content should be a json object with key-value pairs. Dots (.) are not allowed in the keys and will be replaced with underscores (_)"

Any

translations

object

Optional. Use either translations or file Dots (.) are not allowed in the keys and will be replaced with underscores (_)

Any

Examples of payload
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US",
  "translations": {
    "translation_key_1": "Translation 1",
    "translation_key_2": "Translation 2"
  },
  "valid": true
}
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US",
  "file": "path/to/file.json",
  "valid": true
}

zbos/translations/add/response/\{key}

PUB Response: Add translations

Channel tags
  • Translations

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/translations/update

PUB Update translations

Update translations overriding the default values.

Channel tags
  • Translations

UpdateTranslationsRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

category

string

Any

language

string

ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

file

string

Optional. Use either translations or file. The file location should be a path accessible for the RAIL. The content should be a json object with key-value pairs.

Any

translations

object

Optional. Use either translations or file

Any

Examples of payload
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US",
  "translations": {
    "translation_key_1": "Translation 1",
    "translation_key_2": "Translation 2"
  },
  "valid": true
}
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US",
  "file": "path/to/file.json",
  "valid": true
}

zbos/translations/update/response/\{key}

PUB Response: Update translations

Channel tags
  • Translations

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}

zbos/translations/changed/event/\{category}

PUB Event: Translations changed

Channel tags
  • Translations

TranslationsChangedEvent
Payload

Name

Type

Description

Accepted values

category

string

Any

language

string

ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

Examples of payload
{
  "category": "category_1",
  "language": "en-US",
  "valid": true
}

zbos/translations/reset

PUB Reset translations

Reset translations to their default values

Channel tags
  • Translations

ResetTranslationsRequest
Payload

Name

Type

Description

Accepted values

key

string

Any

category

string

Any

language

string

ISO 639-1 language code, Eg: 'en' or 'en-US'

Any

Examples of payload
{
  "key": "abc",
  "category": "category_1",
  "language": "en-US",
  "valid": true
}

zbos/translations/reset/response/\{key}

PUB Response: Reset translations

Channel tags
  • Translations

SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}