Skip to content

Localization

Openfish stores market questions and metadata canonically in English. Public browse APIs can return localized display text when a supported locale query parameter is provided.


The app orders languages by approximate coverage/use:

LocaleDisplay
enEnglish
zhSimplified Chinese
jaJapanese
koKorean
frFrench
esSpanish

If locale is omitted, the API returns canonical English text.


Use GET /browse/markets for localized app-ready market cards.

Terminal window
curl "https://api.openfish.me/browse/markets?status=LIVE&locale=zh&limit=10"

When a translation exists, localized fields are returned in the same response shape as the English response:

{
"markets": [
{
"conditionId": "0xbd31dc8a...",
"questionText": "2027 年前...",
"outcomes": [
{ "tokenId": "123", "label": "", "price": "0.42" },
{ "tokenId": "456", "label": "", "price": "0.58" }
]
}
],
"total": 10
}

Use GET /browse/topics/world-cup/games for localized World Cup match-first discovery.

Terminal window
curl "https://api.openfish.me/browse/topics/world-cup/games?locale=zh"

The World Cup topic localizes display fields such as topic title, match/team names, section titles, common match-result market questions, and outcome labels. It uses stored clob_markets.translations first, then deterministic World Cup templates and team dictionaries. Machine fields remain stable.


Localization is best-effort and asynchronous.

SituationAPI behavior
Supported locale and translation existsReturns localized questionText and outcome labels
Supported locale but translation not readyFalls back to canonical English
Unsupported localeFalls back to canonical English
No locale parameterReturns canonical English

Clients should not treat English fallback as an error.

World Cup topic responses include a localization object with the normalized locale and fallback counts:

{
"localization": {
"requestedLocale": "zh-CN",
"locale": "zh",
"fallbackLocale": "en",
"source": "query",
"translated": true,
"supportedLocales": ["en", "zh", "ja", "ko", "fr", "es"],
"contentSources": {
"marketTranslations": "clob_markets.translations",
"fallbackTemplates": "world_cup_deterministic_v1"
},
"fallbackCounts": {
"topic": 0,
"events": 0,
"sections": 0,
"markets": 0,
"outcomes": 0
}
}
}

Localized responses may add canonical fields such as canonicalTitle, canonicalQuestionText, and canonicalLabel so API clients can keep stable English display text if needed.


Fixed binary outcomes are mapped directly.

Englishzhjakofres
YesはいOui
Noいいえ아니요NonNo

World Cup team outcomes are translated by the tournament team dictionary. Other non-fixed outcomes, such as candidate names or custom answer text, are translated when market translation data is available.