Skip to main content
Skip table of contents

Locales

Overview

OpenTV Platform allows you to define multiple locales for metadata. You can specify that one of these locales is the default locale. If you have defined a default locale, when a client application requests metadata for a locale that is not present in the system, the Metadata Server (MDS) returns metadata for the default locale instead.

For example, if you have set English as the default locale and a client app requests metadata in Portuguese, but no metadata is available in Portuguese, MDS will return metadata in English.

Request

To define locales (including the default locale), send a PUT request to:

https://<server>/bcm/v1/config/metadata/locales/v1
After making this call, existing MDS data must be synced with the new or update locales. Please contact your NAGRA representative and ask them to do this for you.

This call overwrites all existing metadata locales. If you are only making changes or additions, you should get the existing locales (using Get metadata locales), and make the required changes to the payload that it returns before using it as the payload for this PUT request.

Headers

  • Content-Type: application/json

Mandatory fields

The payload must contain at least one object containing the following:

  • id – the unique ID of the locale.
  • code – the ISO locale code (e.g., en_GB)
  • displayPriority – the numeric ordering index. The locale with a displayPriority of zero is the default.

Example

A request with the following payload defines three locales (UK English, French, and Arabic) and sets English as the default:


CODE
[
    {
        "id": "1",
        "code": "en_GB",
        "displayPriority": 0
    },
    {
        "id": "2",
        "code": "fr_FR",
        "displayPriority": 1
    },
    {
        "id": "3",
        "code": "ar_AR",
        "displayPriority": 2
    }
]

Response

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

See also

For full details of this API, see the BCM non-core API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.