Translations (i18n)¶
Overview¶
Languages: English and French, hot-reloadable via /reload.
/lang [locale]— change your language preference (stored inPlayerState.language).- Server-side:
context.i18n.t(language, "feature:server:key", ...args)in aServerMessage.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).