Skip to content

Glossaries

Glossaries in LokAI are workspace-level collections of terms that the LLM must follow when translating. A glossary entry can define:

  • A preferred term — the word or phrase that must be used
  • Forbidden terms — alternatives that must never appear in translations
  • Per-language overrides — different preferred terms per target language
  • Regional variants — e.g. es-MX can override the base es term
  • Creating and editing glossary entries
  • Single-term vs. per-language mode
  • Regional language inheritance
  • AI-assisted glossary suggestions
  • Glossary enforcement in the translation workflow

You can now import and export glossary data in JSON, YAML, and CSV.

  • Open Glossary
  • Click the 3-dots menu in the header
  • Choose Export Glossary or Import Glossary
  • Select the format (json, yaml, csv)
  • GET /api/v1/workspaces/:workspaceId/glossary/export?format=json|yaml|csv
    • Returns a downloadable attachment file.
  • POST /api/v1/workspaces/:workspaceId/glossary/import
    • JSON body:
{
"format": "json",
"content": "{ \"entries\": [ ... ] }"
}

Import is an upsert flow:

  • Existing entries are matched by translationMode + title (case-insensitive title)
  • Matching entries are updated
  • Non-matching entries are created