Configuration

Prompt & glossary

Tune what the model knows about your product so translations read right.

Idiomatic by default#

Every translation prompt asks for natural, idiomatic text in the target language — what a native speaker would actually write in your UI — not a word-for-word rendering of the source. The model is told to use the target language's own phrasing and software conventions, swap idioms for their local equivalent, and avoid calques, without adding or dropping information. Register is not hardcoded: set formal or informal address per locale in language_guides below.

Context#

context names your product and domain in one phrase. It's woven into the translation prompt so the model translates for your application rather than generic text.

.locallingo.yml
defaults:
  context: "Acme, a business banking application"

Glossary#

glossary pins domain terms the model must not paraphrase — the exact words that carry meaning in your app. Each entry becomes a line in the prompt's terminology section.

.locallingo.yml
defaults:
  glossary:
    entity: "business/company account holder"
    member: "user belonging to an entity"

Placeholder style#

placeholder_style documents your interpolation syntax so the model preserves it verbatim instead of translating inside it. Set it to whatever your locales use — Kernel-format %<name>s or Ruby-I18n %{name}.

.locallingo.yml
defaults:
  placeholder_style: "%<name>s, %<count>s"

Per-language style guides#

language_guides appends extra guidance per target locale to both the translation prompt and the quality --ai review prompt — formality, compound-noun rules, number formatting, quotation marks. A value is inline text or a file: path (read relative to the config's base path), so long guides can live in their own Markdown file.

.locallingo.yml
defaults:
  language_guides:
    de:
      file: config/locales/.guides/de.md
    sv: "Use formal Swedish; å, ä, ö correctly; 1 234,56 number format."
config/locales/.guides/de.md
## German Language Guidelines
- Use "Sie" (formal), not "du" — this is a business application.
- Use proper German compound nouns (e.g. "Kontoeinstellungen").
- Avoid anglicisms where a German equivalent exists.
- Nouns are always capitalized; use „…" quotation marks.
- Numbers use German formatting (1.234,56).