Skip to content

Localisation

A Patter project is ready to translate from the start: every line, piece of text, choice prompt, and character name has a stable ID that its translations hang off. Running the translation side of a project is one small loop, and one rule keeps it sane: writers only ever see and edit the source language. Translations live in their own files, never on the writing surface, which is also what makes staleness computable (below).

The translation round-trip: export source strings as JSON, xlsx, or PO; a translator fills them in; import them back into the locale shards. You only ever edit the source language, and stable line ids mean a moved or edited line never orphans its translation. You edit here Source shards export JSON, xlsx, PO Translator import Locale shards You only ever edit the source language. Stable line ids mean a moved or edited line never orphans its translation.

In Project Settings ▸ Language, list the languages you’ll ship and mark the default (the one writers author in). That’s the whole setup.

Everything the player reads goes to translators: dialogue, choice prompts, character and qualifier names, and the text in a text scene, a scene where no character speaks, such as a codex entry or a page of a text game. Game events have no words, so they never do.

Text in a scene where characters speak is different. In a screenplay, a line with no speaker in the middle of a conversation is action (MARA turns away.), a direction for whoever stages the scene, and Patter reads it the same way. A dialogue scene is one with at least one line spoken by a character (a spoken option prompt counts), and by default its text lines are action:

  • They’re left out of every loc export, JSON, Excel, and PO alike, so translators aren’t sent words no player will see.
  • They’re counted apart in the production report, and left out of its localisation counts.
  • They reach the game marked as action, in the source language whatever the locale, so the game can stage the moment rather than show it as on-screen text (see Step shapes).
  • They’re never in a voice script, which takes spoken lines only.

An option’s prompt is always translated, whether it’s spoken or text, because the player picks from it.

If you count the lines in an export and some text is missing, this is why. Every export says how many text lines it left out, and which setting did it, in Patterpad’s Localisation dialog and in patter loc-export’s output alike:

Left out 12 text lines in 3 dialogue scenes: they're action, a direction for whoever stages the
scene, because "Localise text lines in dialogue scenes" (Project Settings, Language;
`localiseDialogueText` in the project file) is off. Turn it on to translate them.

Nothing is lost: the lines are still in your scenes, in the source language, and turning the setting on puts them in the next export.

If your game does show that text to the player, as a text game does, or one that captions its action, turn on Localise text lines in dialogue scenes in Project Settings ▸ Language. A dialogue scene’s text is then translated and shown just like a text scene’s. The setting is off by default, and a text scene is translated whatever it says.

A scene’s kind can change as you write: a text scene gains its first spoken line, the last speaking line in a scene is cut, or someone switches the setting. Patter tells you, rather than letting text slip in or out of translation unnoticed:

  • Export (Patterpad’s Localisation dialog and patter loc-export alike) lists every text line that has dropped out of the loc files or come into them, by id and scene, and names the setting that would keep a dropped line in.
  • Import drops any translation of a line that’s now action, and says how many it dropped and why. A line that’s no longer action goes out in the next export as new and untranslated.
  • patter validate warns, naming the scene, when a scene’s kind no longer matches its translations, so you see the change before you export.

Each language’s file for a scene notes whether that scene’s text was action when an import last wrote it, which is how a change is spotted in either direction.

Production ▸ Export / Import Localisation… (also reachable from the Language tab) runs both halves:

  1. Export writes the source text (and, for a chosen language, its current translations) in the translator’s preferred format (below). Hand the file over.
  2. The translator fills in the Translation column/fields and sends it back.
  3. Import reads the language from the file and reports how many translations changed (re-importing an unedited file reports 0, since unchanged rows aren’t counted). Translations go into that language’s own file; the source is untouched, and the writing surface still shows only the source language.

Every export says which language it’s for, so a file can’t land in the wrong one by mistake:

  • The wrong language is refused. If you pick a language in the dialog and the file says it’s for another, nothing is imported. Pick the file’s language, or leave Template picked and Patterpad uses the file’s own.
  • An older file with no language (an Excel export from before this check) imports as the language you pick, with a warning to make sure that’s right.
  • Lines the project no longer has are skipped. A line cut since the export isn’t written back, isn’t counted, and the import lists it by its ID and scene.
  • Placeholders and formatting are compared with the source. If a translation drops or adds a {@property} placeholder or <b>, <i>, or <bi> formatting compared with the source as it is now, it’s still imported, and the import lists it with what’s missing or extra, so you can send it back to the translator.

Run the loop as often as you like, since it’s incremental rather than a one-shot. Which brings us to:

What changed since last time: the Status column

Section titled “What changed since last time: the Status column”

Writers keep writing while translation happens, so the export tracks staleness per line. The Excel export shows it as a Status column:

  • (blank): not translated yet.
  • translated: it has a translation, and the source line hasn’t changed since.
  • stale: it has a translation, but the source line was edited after it was translated, so it needs re-checking against the new wording.

The names translated beside the lines go stale the same way: changing a character name, a qualifier’s name, the speaker pattern, or a character’s own label with a qualifier in Project Settings flags that string’s translations.

Import writes back every filled-in translation, whatever its Status (an empty Translation cell is left alone). The Status doesn’t decide whether a row imports, only what happens to its staleness. An unflagged row is accepted as fresh (its translation is now current for the source as it stands), while a row still marked stale has its text imported but stays flagged. The translator confirms a re-check by clearing the “stale” cell, not by re-sending the file, so an old spreadsheet can never silently bless an outdated translation. (PO files carry the same signal as the standard #, fuzzy flag.)

All three carry the same IDs and the same staleness signal; pick by who’s receiving the file:

  • Excel (.xlsx) is for human translators working by hand, with one sheet per scene and columns ID / Source / Translation / Comments / Status / Gender / Qualifier, which makes it the friendliest to non-technical folk. The language it’s for is on a hidden sheet named Patter; leave it as it is.
  • PO / POT is for agencies and gettext-based tooling (Poedit, Weblate, Crowdin, …), where exporting with no language gives a blank POT template and staleness is #, fuzzy.
  • JSON is for pipelines and engines, plain ID → string tables, easy to transform or feed into your game’s own localisation system.

Translator-facing comments come from your documentation notes routed to the loc channel, as Reviewing & feedback describes.

A line’s speaker qualifier travels as context, by the name the script shows, so a translator knows a line is a thought or heard over a radio:

Format Where it appears
Excel a Qualifier column
PO / POT the speaker in the extracted comment, #. [line TAM (O.S.)]
JSON context.qualifier on the entry

It’s context only, never text to translate, and it’s never read back on import. The qualifier names themselves (V.O., RADIO) are translated with the cast’s character names, as qualifier:vo-style strings beside the cast: ones, for the qualifiers your lines use.

Two more strings sit beside them when your lines use a qualifier (see How a qualified speaker is shown):

  • speaker:pattern, how a name and a qualifier go together, {name} ({qualifier}) in English. Keep {name} and {qualifier} as they are; move them, or change the punctuation around them, to suit the language. Most languages copy it unchanged.
  • speaker:PLAYER:vo, one for each character and qualifier pair the writer gave a label of its own (“Your thoughts”), translated like any other phrase, with the character and the qualifier as context. A pair without one follows the pattern, so there’s nothing to translate for it.

A gendered language often has to inflect the line itself to match its speaker, in adjectives, participles, and sometimes the verb. English source text rarely reveals which, so a translator working line by line is left guessing, and guessing wrong is a bug you only find in a late language pass.

Set a character’s Grammatical gender in Project Settings ▸ Cast and every export carries it alongside that character’s lines:

Format Where it appears
Excel a Gender column
PO / POT an extracted comment, #. Gender: female
JSON context.gender on the entry

The field is free text, because three genders don’t cover every language: it auto-suggests the everyday values (male, female, neuter) plus any others already used in the cast, so you can name a common, animate, or inanimate gender while keeping spellings consistent. Whatever you type is passed to translators verbatim. It rides the character’s own dialogue and their character name. Text, which has no speaker, and characters left blank carry nothing, so you only send what you actually know.

Gender is export-only context: it is regenerated from the cast on every export, never read back on import, and never shipped in the compiled .patterc bundle. Change a character’s gender and the next export tells translators the truth. It describes the character as a grammatical subject for translation purposes; it is not shipped to, or read by, your game.

At publish time (Project Settings ▸ Publish ▸ Localisation) you pick how the built bundle carries text.

Embedded is the default. Every translated language ships inside the bundle, and the runtime resolves the right text and can switch language live, mid-game, with no rebuild. It’s right for self-contained games, with nothing else to set up.

In IDs-only mode the bundle ships no text at all. The runtime hands your game each line’s ID and your game’s own localisation system supplies the string. That’s right when the game already has a loc pipeline (Unity Localization, i18n, a CMS…).

A sub-option, Embed source language for debug, adds the source text to an IDs-only build just so it’s playable before your loc system is wired up. It warns it’s not for release, so leave it off for a real build.

Crucially, the choice doesn’t change the translation loop above: either mode exports and imports the same files. Going IDs-only never cuts you off from Patter’s round-trip, and you still hand translators the same spreadsheets and feed the results into whichever pipeline ships them.

The Play window always previews fully translated, whatever the build mode: switch language from its menu and read the script in any locale, even on an IDs-only project. A string missing in a locale plays as the source text flagged <Untranslated: …>, so a half-finished translation is impossible to miss.

The same loop, scriptable (see the CLI):

Terminal window
patter loc-export -o strings.json --format json # a blank template (all source, empty translations)
patter loc-export -o fr.xlsx --format xlsx --locale fr # the fr table as a spreadsheet
patter loc-import fr.xlsx # bring a translated file back

--format is json | xlsx | po; omitting --locale produces a blank template / POT. The build mode is picked per export too: patter export --ids / --source-debug. On import, --locale names the language to import as: a file for another language is refused unless you add --force-locale. The import prints the same list of skipped lines and translations to check as Patterpad shows.

How the two modes look from inside the game (setLocale, interpolate, the untranslated fallback, all four runtimes) lives with the rest of the integration docs, on Localisation at runtime.

Open source under the MIT licence, made by .