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.
Supported Locales
Section titled “Supported Locales”The app orders languages by approximate coverage/use:
| Locale | Display |
|---|---|
en | English |
zh | Simplified Chinese |
ja | Japanese |
ko | Korean |
fr | French |
es | Spanish |
If locale is omitted, the API returns canonical English text.
Browse APIs
Section titled “Browse APIs”Use GET /browse/markets for localized app-ready market cards.
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.
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.
Fallback Behavior
Section titled “Fallback Behavior”Localization is best-effort and asynchronous.
| Situation | API behavior |
|---|---|
| Supported locale and translation exists | Returns localized questionText and outcome labels |
| Supported locale but translation not ready | Falls back to canonical English |
| Unsupported locale | Falls back to canonical English |
No locale parameter | Returns 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.
Outcome Labels
Section titled “Outcome Labels”Fixed binary outcomes are mapped directly.
| English | zh | ja | ko | fr | es |
|---|---|---|---|---|---|
| Yes | 是 | はい | 예 | Oui | Sí |
| No | 否 | いいえ | 아니요 | Non | No |
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.