Translator Notes

Updated: last quarter · 2 min read

Deprecated

These docs cover the legacy CLI (v0). The current CLI is v1. See the current CLI docs

Some file formats support inline comments that the Lingo.dev CLI includes in translation requests. These comments provide context to the AI model - disambiguating terms, specifying tone, or describing where content appears in the UI.

Why translator notes matter#

The word "Records" can refer to medical records, music records, or database records. Without context, the AI model has to guess. A translator note eliminates the ambiguity:

jsonc
{
  // Medical context: refers to patient medical records
  "records": "Records"
}

The comment is sent alongside the string in the translation request, steering the model toward the correct interpretation.

Supported formats#

Translator notes are currently supported in:

FormatBucket typeComment syntax
JSONCjsonc// comment above the key
Xcode String Catalogsxcode-xcstringsComment field in the .xcstrings file

JSONC example#

jsonc
{
  // Navigation menu item - appears in the top header bar
  "nav.home": "Home",

  // Button label - triggers form submission, keep it short
  "form.submit": "Submit",

  // "Light" refers to the visual theme, not weight or illumination
  "settings.theme.light": "Light"
}

To use JSONC, configure the jsonc bucket type in your i18n.json:

json
{
  "buckets": {
    "jsonc": {
      "include": ["locales/[locale].jsonc"]
    }
  }
}

Writing effective notes#

Effective translator notes describe context that isn't obvious from the string itself:

EffectiveWhy
// Button label in checkout flowTells the model about UI placement and expected brevity
// "Set" means a collection, not the verbDisambiguates a polysemous word
// Formal tone - displayed in legal footerSets register expectations

Notes that restate the string itself (// This says Welcome) don't add value.

Next Steps#