Get Localization
horizon_get_localizationRetrieve a single translated string by key for a specific language, defaulting to the app's default. Use for dynamic messages; missing keys return null and found false for fallback.
Instructions
Reads one translated string by key in one language (default: the app's default language). Use when: the game needs a single text, for example a dynamic message. Not for: loading the UI texts at start (use horizon_get_all_localizations) or finding out which languages exist (use horizon_get_localization_languages). Side effects: None (read only). Returns: {localizationKey, value, language, found}. A missing key or translation is not an error: found is false and value null, so show a fallback text. Errors: Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Localization key exactly as defined in the dashboard, for example 'ui.play_button' (max 100 characters) | |
| lang | No | ISO 639-1 language code (2 lowercase letters). One of: en, de, es, fr, it, pt, nl, pl, ru, ja, zh, ar, ko, tr, id. Omit for the app's default language. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| found | No | ||
| value | No | ||
| language | No | ||
| localizationKey | No |