Localization
Openfish stores market questions and metadata canonically in English. The public app and Browse API can return localized display text for live markets when a supported locale query parameter is provided.
Supported Locales
Section titled “Supported Locales”| Locale | Language |
|---|---|
zh | Chinese |
ja | Japanese |
ko | Korean |
fr | French |
es | Spanish |
If locale is omitted, the API returns canonical English text.
Browse API
Section titled “Browse API”Use GET /browse/markets for localized app-ready market cards.
curl "https://api.openfish.me/browse/markets?status=LIVE&locale=ja&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}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.
Outcome Labels
Section titled “Outcome Labels”Fixed binary outcomes are mapped directly and do not require model translation.
| English | zh | ja | ko | fr | es |
|---|---|---|---|---|---|
| Yes | 是 | はい | 예 | Oui | Sí |
| No | 否 | いいえ | 아니요 | Non | No |
Non-fixed outcomes, such as candidate names, teams, or custom answer text, may be translated when the market translation is available.
Translation Freshness
Section titled “Translation Freshness”Only live market content is prioritized for localization. Newly imported or newly live markets may appear in English first, then return localized text after the asynchronous translation process completes.
For user-facing apps:
- Request the user’s locale on every market list request.
- Render English fallback normally.
- Refresh market cards periodically or when the user changes locale.
- Do not cache missing translations permanently.