Translations
By default, all dialogue and response prompts will be run through Godot's tr function to provide translations.
Translations in dialogue work slightly differently depending on whether you have use static IDs as translation keys enabled or not (it's enabled by default).
When enabled, lines will be translated by assuming that the line's static ID (eg. [ID:SOME_KEY]) is also the translation key (ie. your translation file is keyed with SOME_KEY for that line) and calls to tr will include "dialogue" as the context.
When not enabled, lines will be translated by passing the line's text in as the translation key. If a static ID exists it will be passed to tr as the context.
Static line IDs in dialogue
Dialogue lines and response lines can specify a unique ID per line in the form of [ID:SOME_KEY] where "SOME_KEY" is a unique string identifying that line/response.
For example:
Nathan: Hi! I'm Nathan. [ID:HI_IM_NATHAN]
Coco: Meow. [ID:MEOW]Static line IDs are useful if you need to match up lines with voice acted dialogue.
[!IMPORTANT] Runtime tags/bbcode (eg.
[next=auto],[wave], etc) are part of the dialogue line so they should be included in any translations.
Generating a POT/gettext or CSV file for translation
All .dialogue files are automatically added to the Template Generation list in Project Settings > Localization for them to be included in the general translation export.

[!NOTE] If static line IDs are present in lines of dialogue that key will be used as the POT item msgid for that line, and the dialogue itself will be in the translators notes. This can be changed in Project Settings > Dialogue Manager > Editor > Use Static IDs as Translation Keys.
From here you can export as either a PO Template for gettext or as a CSV.
Adding notes for translators
Having context is essential for future translators. As you may know, in gettext files the lines starting with #. TRANSLATORS: serve as notes for translators. To achieve this behaviour you can add a line starting with ## before your dialogue line, this will end up as a special comment for translators in your POT and PO files.
[!NOTE] This behaviour is impemented by Godot itself.
## This is the first time that Nathan meets Coco
Nathan: Hi! I'm Nathan. [ID:HI_IM_NATHAN]
Coco: Moew. [ID:MEOW]#. TRANSLATORS: This is the first time that Nathan meets Coco
#: [path to the dialogue file]nathan_meets_coco.dialogue
msgctxt "HI_IM_NATHAN"
msgid "Hi! I'm Nathan."