2026-11-28

key text

a plaintext format for associating identifiers with text, primarily intended for translations and for keeping document or interface copy separate from configuration. it supports both multiline text and compact single-line entries.

blocks are separated by the exact sequence "\n\n---\n\n". each block starts with a header, an empty line, and its content. three forms are defined:

  • "id: identifier" assigns the entire following multiline body to one identifier
  • "map" contains lines of "identifier: text", assigning a single-line value to each identifier. the first colon followed by a space separates the identifier and text
  • "map: prefix" behaves like "map", but prepends the specified prefix to each entry identifier without inserting a separator

example:

id: introduction

This handbook describes the shared workspace.

Visitors should sign in at reception before entering.

---

map

document_title: Workspace handbook
section_title: Visitor information
contact_label: Contact details

---

map: settings.

title: Settings
save: Save
cancel: Cancel

---

id: settings.description

Configure application behaviour and preferences.

identifiers are nonempty, single-line strings matched exactly, without normalization. prefixes are literal strings and do not introduce nested structure or occupy the identifier namespace themselves. periods and other characters have no special meaning within identifiers.

all entries share one flat namespace across all block forms. duplicates are invalid and are determined after prefix application. multiline bodies preserve whitespace and internal newlines without trimming. the block separator cannot occur literally within a body. malformed blocks are invalid; when the format is used by a compiler, references to undefined identifiers are errors.

benefits

  • keeps translations and other text separate from configuration without requiring escaped strings
  • supports multiline prose and compact single-line labels in one file
  • groups related entries without repeating identifier prefixes
  • simple structure with direct lookup by identifier
  • independent of identifier naming conventions

drawbacks

  • the exact block separator cannot occur within text bodies
  • map values cannot span multiple lines
  • identifiers must be unique across all blocks