Internationalization for Portalborn

A text-based RPG where localization is the game rather than a layer over it. A string that fails to resolve is a room the player can't read.

Translation functions replaced
30+
Naming conventions collapsed
20+
Languages shipped
2 English and Simplified Chinese
Role
Engine design, refactor, documentation
Status
Shipped
Stack
JavaScript, i18n, Refactoring
Source
Not mine to share

Portalborn is a text-based RPG on Steam, built by a solo developer. Text-based means localization isn't a layer over the game. It's the game. A string that fails to resolve is a room the player can't read.

What I found

I came in to help with translation, and the translation layer turned out to be the thing that needed help. Localization had been added after the initial release, largely through AI-assisted tooling with nobody holding a single convention, so the methodology drifted several times along the way.

What was left was more than thirty translation functions and over twenty conventions for naming translated text, with no seam anywhere a new language could be introduced. Most of it lived inside two files of 25,000-plus lines.

Finding out what actually ran

The source alone couldn't tell me. A retired path and a live path look identical on the page, and the only difference is whether anything still calls them. So I instrumented the running game and traced which routes real play exercised.

Then I built one engine to replace what I found, wrote the standard for how new strings get added, and documented it. The engine was the smaller half of the job. He maintains this alone long after I stop touching it, so a system he couldn't use without me would have been a worse outcome than the one I inherited.

What I did not get to

A handful of call sites never surfaced under instrumentation and still sit on the old paths, and there's duplication in existing content I couldn't fully unpick. The job was imposing one standard on a system I couldn't completely map.

Everything added to the project since then goes through human review before it lands, for architecture and code structure as well as game design. That process change has outlasted the engine I wrote, and of the two it's the one I'd rather be judged on.

All work