RGS Translations
Loads a game's UI string catalogue from the RGS — the platform's shared chrome strings merged with the game's own overrides — and serves single strings by key. Browser only: it reads from the RGS but never compiles to it.
Set Game Slug and Language (a BCP-47 tag such as en, pt-BR or de; default en) and fire Fetch. The node GETs {rgsUrl}/game-translations?lang=…&game_slug=…, a public route that needs no key or session token, so the loading screen itself can already be localised. The RGS normalises the tag (pt_br becomes pt-BR; an unparseable value becomes en) and merges layers least specific first — global en, pt, pt-BR, then the game's own en, pt, pt-BR — each key overriding the last.
Strings is the merged object of key to text. Served Language is the most specific language that contributed a layer, and Fallback Used is true when it differs from Requested Language — pt-BR asked for but only pt authored, say. Loaded fires after each successful read. An unknown or inactive Game Slug is not an error: the global chrome strings still load; with Game Slug blank the catalogue is the global chrome only.
Text is the one string for Key, re-read whenever Key changes, and falls back to the key itself when the catalogue has no such string — so a Text node wired to it never goes blank, and an untranslated key shows as its own name in QA. The node does no placeholder substitution; format {name}-style placeholders in a JavaScript Function fed from Strings.
Fire List Languages to fill Languages with every language the platform has global strings for, as sorted tags — the list a language picker should offer; it fires Loaded too. A network error or non-2xx answer fires Failed with Error set to the RGS's message (No translations available when no layer has strings) and leaves the last good catalogue untouched. Out-of-order responses are dropped.
Pair the node with Languages Dictionary when the game carries phrases of its own that are not on the platform. The Slot Features guide shows where this node sits among the slot feature nodes.
Inputs
Actions
| Signal | Description |
|---|---|
| Fetch | Loads the catalogue for Language and Game Slug; fires Loaded or Failed. A newer request supersedes an older one still in flight. |
| List Languages | Loads the platform's language list into Languages (GET ?langs=1); fires Loaded or Failed. |
Parameters
| Data | Description |
|---|---|
| Game Slug (string) | The game's slug on the RGS. Blank (default) loads the global chrome strings only; an unknown or inactive slug also falls back to global. |
| Language (string) | Requested language, a BCP-47 tag such as pt-BR. Default en; blank means en. The RGS normalises case. |
| RGS URL (string) | Base URL of the RGS edge functions. Default: the RGS's production functions endpoint; a blank value restores it. |
| Key (string) | Key of the string Text should show. Change it any time; Text follows at once. |
Outputs
Results
| Data | Description |
|---|---|
| Strings (object) | The merged catalogue, an object of key to text. Kept from the last successful Fetch. |
| Text (string) | The string for Key, or the key itself when missing — never blank while Key is set. |
| Served Language (string) | Language actually served: the most specific layer that had strings, normalised, e.g. pt-BR. |
| Requested Language (string) | The language asked for, as the RGS normalised it. |
| Fallback Used (boolean) | true when Served Language differs from Requested Language, i.e. the player is seeing a fallback. |
| Languages (array) | Sorted array of language tags the platform has global strings for; filled by List Languages. |
| Error (string) | Last RGS or network error message, e.g. No translations available, HTTP 500; cleared on success. |
Events
| Signal | Description |
|---|---|
| Loaded | Fires after a successful Fetch or List Languages. |
| Failed | Fires when a request fails; Error says why. The previous catalogue stays. |
Usage
- Add RGS Translations; set Game Slug to the slug the game was published under and Language from the player's setting.
- Fire Fetch when the game starts and reveal the UI from Loaded.
- Key and Text serve one label per node; for a whole screen wire Strings into a JavaScript Function and index it by key.
- Fire List Languages to fill a language picker from Languages; on change set Language and fire Fetch again.
- Show Fallback Used in QA builds to spot markets whose strings are not authored yet.
Catalogue responses are cacheable for five minutes, so a string edited on the platform can take that long to reach a running game. Only languages with global strings appear in Languages; a language authored for one game alone does not.