# Translation Feed

{% content-ref url="/pages/TqkGvEKMYF8mpmNGgDt9" %}
[Translation Change Feed](/odds88-client-api/odds88-feeds/translation-change-feed.md)
{% endcontent-ref %}

* It is recommended to use translations provided from Odds88. All translations are received via corresponding endpoints.
* Translation changes feed is used to get information about what properties have translation updated. Depending on the type of message received from the feed one of the translation endpoints has to be called with id specified in the message.
* Sports, Locations, Leagues rarely receive translation updates. Every event, market and selection inside the event are translated after being created.
* Messages have following types and actions that have to be done upon receiving it:

0 - sport translation changed. Fetch and update translations for sport

1 - location translation changed. Fetch and update translations for location

2 - league translation changed. Fetch and update translations for league

3 - competitor translation changed. Fetch and update translations for competitor

4 - market translation changed. This type of translation can be ignored as every event has individual translations for selections and markets

5 - selection translation changed. This type of translation can be ignored as every event has individual translations for selections and markets

6 - event translation changed. Fetch translation for the event [**/api/translations/all/event/{eventId}**](/odds88-client-api/odds88-api-endpoints/translations-api.md#get-api-translations-all-event-eventid) and markets [**/api/translations/all/{eventId}/markets**](/odds88-client-api/odds88-api-endpoints/translations-api.md#get-api-translations-all-eventid-markets) from this event. Update translations for event, markets and selection names

* In case there is no translation for a certain language, it should fall back to English. In case there is no translation for English, it should fall back to a name sent in delta feed.

### Recommended way of implementing translations

1. Once a new event is received, process it and cache it
2. Fetch translations by calling:

```
/Translations/all/event/{eventId}
```

This endpoint returns translations in all languages for the event, including competitors, sport, league, and location

* Cache these translations by `eventId` (or merge them into the existing event if only a single language is used)

3. When markets are received—either during event creation or later—do the following:

* Check whether the market already exists and has been translated (for example, using a field like `IsTranslated = true/false`)
* If the market is not translated, send a request to the following endpoint to retrieve translations:

  ```
  /Translations/{lang}/{eventId}/markets?m=1&m=2&m=3
  ```

  If no `m` parameter is provided, the endpoint will return translations for all markets
* Once the translations are received, store them for each market. If a single language is used, simply replace the translations in the main cached event’s markets

4. When a Market Update is received, first check whether the market has already been translated and stored in Redis (`IsTranslated = true/false`)

* If the market exists in the cache, only update the relevant fields such as odds, status, and settlement
* Use the `IsTranslated` flag to determine whether there is a need to fetch translations from the Odds88 API or whether the existing cached translation is sufficient

{% hint style="warning" %}
Both the odds feed and the translation API response always include the market ID and market type ID
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.odds88.io/integration-process/recommended-integration-flow/translation-feed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
