Localization (planned)
Since 2026-11-28 the player chooses its language in a drop-down list (LanguageList, the languages by their own names: Loc.Choosable, Loc.NativeName) on the character screen and in the opening story; it is kept on the PC (Settings.Language; never chosen: the system's, Settings.LanguageOrSystem, applied at the start unless --lang is given). The Options tab says where (GameMenu.LanguageLine); its own list there is still to come. The string tables exist (Client.Core Loc, step 3 below) and the UI kit fits every text to its box (UI kit), but most texts do not go through them yet. This page is the plan for adding a language choice, so that new code does not make it harder.
Where the texts are today
| Texts | Where |
|---|---|
| Menu tabs, buttons, switches, tab lines, item details | Libs/Client.Core: GameMenu, InventoryScreen, RaidBoardView |
| Notifications made by the client ("Teleported to the safe zone.", welcome...) | Apps/Client/Scripts controllers (GameMenuController, RaidBoardController, GhostController...) |
| Login screens, HUD | LoginUi, VrMenu, Hud, HudController; update messages: Client.Core ClientUpdates.Message |
| Texts sent by the servers | ScoutResultMsg.Text, LobbyStatusUpdateMsg.Text, ApiServer error messages (ApiException) |
Most menu texts are already built in Client.Core from enums (MenuTab, MenuAction, MenuToggle, EquipSlot). That is the place to translate them.
Plan
- Language setting:
Settings.Language("en"by default, saved inuser://settings.cfg). The first launch takes the system language (OS.GetLocaleLanguage()) if the game has it, else English. - Choice in the menu: a Language button in the Options tab (VR: on the centre screen, under the switches) that cycles through the available languages, and the same choice on the login screen (VR
VrMenuand desktopLoginUi). It replacesGameMenu.LanguageLine. The change applies at once: the menu refreshes, no restart. - String tables in
Client.Core(done):Loc(engine-free, tested) with one table per language, keyed by stable ids (ui.cancel,plate.level; latermenu.tab.inventory,action.tp_safe_zone...), with values by name ({damage}), plurals ({seconds, plural, one {...} other {...}}), numbers the language's way (1,5,12 500) and big numbers short ({damage:short}:12,5 K): the syntax is in UI kit. The tables areLibs/Client.Core/Lang/<code>.json(en,fr,de,nl), embedded in the assembly. A missing key falls back to English, then to the key;UiKitTestschecks that every language has every English key with the same placeholders. The test languagepseudois English about 40 % longer. Only the UI kit and the nameplates use it so far. - Callers ask
Locinstead of writing English:GameMenu.Title(tab)becomesLoc.Get($"menu.tab.{tab}"), and so on. Numbers shown to the player go throughLoc({n}in a text,Loc.Number,Loc.Short); elsewhere (logs, files, the network) the invariant culture stays (Mainsets it). To try a language now:-- --lang de(fr,nl,pseudo). - Server texts: the servers send ids and values instead of English sentences (for example a
ScoutResultcode and the camp level). The client builds the sentence in its own language. This changes message formats, so it raisesProtocolVersion.Current(seeAGENTS.md). Until then, server texts stay in English. - Fonts: Godot's default font covers Latin, Greek and Cyrillic. Other scripts (CJK, Arabic...) need a font file added as a fallback in the project theme and on the
Label3Dof the VR widgets. - Layout (done for the kit): some languages are about 30 to 40 % longer than English. The UI kit's widgets fit their texts (
UiText,TextFit: the largest size that holds, down to the style's minimum, then "…"), so a long word shrinks instead of overflowing; check new screens inpseudoandde(UI kit, picture languages). Screens still built withVrWidgets.Button(fixed font size) must be checked on the--vr-menu-previewscreenshots (Tools/Dev/Validate.ps1 -Screens) until they move to the kit.
Rules until then
- New player-facing texts go through
Loc(a key in everyLang/*.json), or at least intoClient.Corehelpers (likeGameMenuandInventoryScreen), not inline in Godot scripts. - Build sentences from whole strings with placeholders, not by gluing pieces together ("Raid size: " + n is fine, word order in sentences is not).
- Do not compare a displayed text to decide something. Use the enum or id behind it.