Translations

API for communication with ZBOS by Zora Robotics.

Channels

zbos/translations/get

publish

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

Message 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}

publish

Response: Get translations

Channel tags
  • Translations

Message 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

publish

Request translation registrations

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

Channel tags
  • Translations

Message EmptyMessage

Empty message

Payload

Name

Type

Description

Accepted values

Message Payload

object

Any

Example of payload (generated)
{}

zbos/translations/add

publish

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

Message 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}

publish

Response: Add translations

Channel tags
  • Translations

Message 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

publish

Update translations

Update translations overriding the default values.

Channel tags
  • Translations

Message 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}

publish

Response: Update translations

Channel tags
  • Translations

Message 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}

publish

Event: Translations changed

Channel tags
  • Translations

Message 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

publish

Reset translations

Reset translations to their default values

Channel tags
  • Translations

Message 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}

publish

Response: Reset translations

Channel tags
  • Translations

Message SuccessMessage

Success message

Payload

Name

Type

Description

Accepted values

success

boolean

Any

message

string

Optional error message

Any

Examples of payload
{
  "success": true
}