Game ideas & features

Your next feature

Localization

Display a test string in German and English.

Godot
Illustration of Localization
Your visible result

A test string appears in both selected languages.

Create a localization key1:56
Open video separately ↗

Prepare the same project

  1. Choose the same project in the dashboard as in your game configuration.

    Localization →
  2. Create or reuse these test entries in the dashboard form. These are example values, not current project data.

    Localization Key
    menu.play
    Value
    de: Spielen, en: Play
  3. Save, reload and verify the entries before running the example. Preserve unrelated definitions.

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed and project configuration imported.

Save the GDScript, attach it to a node in the main scene and run it. Check Output.

GDScript
res://scripts/localization.gd
horizOn callSetup
1# Attach this script to a node in your main scene.
2extends Node
3​
4​
5func _ready() -> void:
6 # Setup: initialize and connect.
7 var connected = await Horizon.connect_to_server()
8 if not connected:
9 print("Failed to connect to horizOn server")
10 return
11​
12 # horizOn: pick the language and read translated texts.
13 # Read fresh copies of both translations.
14 Horizon.localization.clearCache()
15 var german: String = await Horizon.localization.getLocalization("menu.play", "de")
16 var english: String = await Horizon.localization.getLocalization("menu.play", "en")
17 print("de=", german, ", en=", english)
Open the complete SDK sample ↗

Test your new feature.

A test string appears in both selected languages.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • GET/localization/{key}
  • GET/localization/all
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.