Skip to main content

Localisation

The localisation system allows dialogue text and audio to be translated for multiple languages.

It uses a per-beat key scheme that maps each localisable beat to a localisation table entry.

How it works

Each text beat and audio beat can be localised. The system generates a unique key for each localisable beat based on its position in the tree:

  • beat keys follow the format {node.id}#{beatGroupIndex}
  • connection (response option) keys use connection.entryId

These keys are used to look up translated text and audio from localisation tables.

Localisation capabilities

Beats declare their localisation support through LocalisationCapability flags:

  • None -- no localisation
  • Text -- text content can be localised
  • Audio -- audio content can be localised

Text beats implement ILocalisableTextBeat and audio beats implement ILocalisableAudioBeat.

Resolution flow

When a beat is displayed:

  1. the system checks whether a localisation service is available
  2. if available, it attempts to resolve localised text or audio for the current locale
  3. if a localised version exists, it is used instead of the default content
  4. if no localisation is found, the original content is used as a fallback

Locale management

ILocaleService handles locale switching. When the locale changes, all subsequently displayed dialogue uses the new locale's content.

LocaleSettings configures the available locales and the default locale for the project.

Editor tooling

DialogueLocalisationHarvester is an editor tool that scans chat trees and produces localisation entries. It extracts all localisable keys from the dialogue content so they can be added to localisation tables.

The localisation editor window provides:

  • filtering by scope, status, and audio
  • coverage indicators showing how complete each locale's translations are
  • harvest and save operations

Access it through the editor menu.

Registration

The localisation services are registered in DialogueModuleRegistrar. When no localisation service is configured, the dialogue system registers fallback implementations that return the original content unchanged.

Practical advice

Build dialogue content in your primary language first. Add localisation once the conversation structure is stable. Changing node order or adding beats after localisation has begun can invalidate existing keys.

Use the harvester regularly to ensure your localisation tables stay in sync with the dialogue content.

Next step

Continue to Custom Beat Types.