Game ideas & features

Your next feature

Localization

Display a test string in German and English.

Unity
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 C# file, attach it to a GameObject and enter Play. Check Console.

C#
Assets/Scripts/LocalizationDemo.cs
horizOn callSetup
1using UnityEngine;
2using PM.horizOn.Cloud.Core;
3using PM.horizOn.Cloud.Manager;
4​
5// Attach this script to a GameObject in your first scene.
6public class LocalizationDemo : MonoBehaviour
7{
8 async void Start()
9 {
10 // Setup: initialize and connect.
11 HorizonApp.Initialize();
12 await new HorizonServer().Connect();
13​
14 // horizOn: pick the language and read translated texts.
15 // Read fresh copies of both translations.
16 LocalizationManager.Instance.ClearCache();
17 var german = await LocalizationManager.Instance.GetLocalization("menu.play", "de");
18 var english = await LocalizationManager.Instance.GetLocalization("menu.play", "en");
19 Debug.Log($"de={german}, en={english}");
20 }
21}
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
Illustration of Leaderboards
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.