Messages

The translation content that is actually parsed and rendered by the system.


Interface

Intor uses LocaleMessages as the data interface for translation content.

type LocaleMessages = Record<string, MessageObject>;
{
  "en": {
    "title": "Hello",
    "nav": {
      "about": "About"
    }
  },
  "fr": {
    "title": "Bonjour"
  }
}
  • Translation content is organized with locale as the top-level structure
  • Each locale maps to a MessageObject , representing the complete translation structure for that locale

Messages Organization

Create a messages/ directory at the project root to store translation content for each locale.

index.json

index.json
  • Each locale corresponds to a dedicated directory
  • Each locale must expose a single entry point at messages/{locale}/index.json

Intor intentionally uses {locale}/index.json as the entry point for translation content, instead of the {locale}.json pattern.

This ensures consistent structure and behavior across different loading approaches and tooling.