Skip to content

Translations (i18n)

Overview

Languages: English and French, hot-reloadable via /reload.

  • /lang [locale] — change your language preference (stored in PlayerState.language).
  • Server-side: context.i18n.t(language, "feature:server:key", ...args) in a ServerMessage.Notification.
  • Client-side (TypeScript): window.mcT("feature:client:key").

Key format: feature:scope:key where scope is server or client.

Route Purpose
GET /api/i18n/{locale} client-facing translation keys for a locale

Configuration

data/config/i18n/{locale}.yaml — en.yaml and fr.yaml. New user-visible strings must be added to both. I18nConfig is instantiated in GameLoop and reloaded with /reload. Schema: i18n.schema.json (hand-written).