Studio: editor translation system (XLIFF i18n)

Goal

Implement a translation/internationalization (i18n) system for the Studio using the XLIFF file format for loading and exporting translations. Provide a function (or equivalent) to handle translatable strings, plurals, and hints. The system should support exporting all strings via into XLIFF format.

Consider alignment with in-game localization (#36 (closed)) — ideally both Studio and runtime use the same technical solution.

Context / integration points

  • The Studio UI is currently English-only with hardcoded strings.
  • Future in-game localization (#36 (closed)) will need similar infrastructure — sharing the system avoids duplication.
  • XLIFF (XML Localization Interchange File Format) is an industry standard for translation workflows.
  • Build system integration () should extract all translatable strings automatically.
  • Potential modern alternatives to evaluate alongside XLIFF: Fluent (.ftl), gettext (.po), or JSON-based formats.

Design

  • Design a string table system with a function: returning the localized string.
  • Support: simple strings, plural forms (zero/one/two/few/many/other via CLDR rules), and developer hints (context for translators).
  • Use XLIFF 1.2 or 2.0 as the primary editable format (supported by translation tools like Crowdin, POEditor, etc.).
  • walks all source files, extracts calls, and generates/merges an XLIFF file.
  • At build time or runtime, compile XLIFF into a compact lookup table (binary or Zig code).
  • Evaluate Fluent (.ftl) as a complementary format — it may be better suited for in-game runtime (#36 (closed)) while XLIFF serves the translation pipeline.
  • Integrate with the Studio's Settings panel for language selection.

Tasks

  • Research and decide on the core string format (XLIFF + maybe Fluent)
  • Implement function with plural support and hints
  • Implement XLIFF parser/generator
  • Implement string table compiler (XLIFF → compact lookup)
  • Add command
  • Migrate all Studio strings to use
  • Add language selector in Settings panel
  • Evaluate alignment with in-game localization (#36 (closed))
  • Document the translation workflow for contributors

Acceptance criteria

  • All Studio UI strings use — no hardcoded user-facing strings.
  • produces a valid XLIFF file with all strings.
  • Loading a translated XLIFF file updates the Studio UI language.
  • Plural forms work correctly for different locales.
  • Developer hints are included in the XLIFF output.
  • The solution is compatible with in-game localization needs (#36 (closed)) or has a clear migration path.

Dependencies

Related to #36 (closed) (in-game localization).

Out of scope

  • Automatic machine translation.
  • Runtime hot-reload of translations (post-MVP).
  • RTL layout mirroring.