Pardon our dust while we move our docs here. The Godot (GDScript) docs are on this site, and the Yarn language, Unity, Godot (C#) and Unreal docs are still at docs.yarnspinner.dev.

Every line in a Yarn Script can have an ID, called a line tag. The Dialogue Runner uses the ID to find everything that belongs to the line: its translated text, its voice clip, and any image that goes with it.

Rosa: The lamp's been out for days. #line:a1b2c3d
Line 1 #line:a1b2c3d is the line’s ID. The addon can add one to every line, so you don’t have to write them by hand.
A line with a line tag.

Translated text

Yarn Spinner for Godot uses Godot’s own translation system. When a line runs, the Dialogue Runner looks up its text in Godot’s TranslationServer, using the line’s ID with YARN_ in front. If there’s no translation for the current language, it uses the text written in the Yarn Script.

Neither Godot nor Yarn Spinner translates your lines. They put your lines in a file a translator can work with, and show the right language in the game. You or your translators do the translating.

To get your lines to translators, export them from the Yarn Project as a CSV file. Each row has the key and the line’s text. Translators add a column for each language, and Godot imports the file as translations, the same way as any other translation CSV:

keys,en,de
YARN_line:a1b2c3d,Rosa: The lamp's been out for days.,Rosa: Die Lampe ist seit Tagen aus.
An exported CSV, with a German column added by a translator.

Voice clips and images

Voice clips and images are found by the line’s ID as well. A clip called a1b2c3d.ogg in res://audio/dialogue/ belongs to the line tagged #line:a1b2c3d. For other languages, Godot’s translation remaps can swap in a different clip for the same line. See Voice-Over.

flowchart LR
  line["Rosa: The lamp's been out for days.<br>#line:a1b2c3d"]
  subgraph godot["Godot"]
    direction TB
    translations[("Translations<br>YARN_line:a1b2c3d")]
    audio[("res://audio/dialogue/<br>a1b2c3d.ogg")]
  end
  line -->|"translated text"| translations
  line -->|"voice clip"| audio
How the Dialogue Runner finds a line’s text and voice clip from its ID.

In this section

  • Localising Your Game: adding line tags, exporting and importing translations, and switching language while the game runs.
  • Line and Asset Providers: how the Dialogue Runner finds each line’s text, voice clip and image, and how to change it.
Get started Localising Your Game Adding line tags, exporting lines for translators, importing their translations, and switching language while the game runs.