|
Documentation
Book a DemoPlatform
Platform
MCPCLIAPIWorkflows
GuidesChangelog

Getting Started

  • Introduction
  • Connect Your Engine

Localization Engine

  • Overview
  • Brand Voices
  • Rules
  • Glossaries
  • LLM Models
  • Cache Tokens
  • Locale Resolution

Quality

  • Reports
  • AI Reviewers
  • Playground
  • Engine Suggestions

Admin

  • API Keys
  • Team
  • Roles & Permissions
  • Audit Logs

Rules

A rule is one named linguistic instruction the localization engine applies to a target locale - "abbreviate Straße to Str. in addresses", not "be more casual". Rules live in rulesets: organization-owned containers an engine applies by attachment, so one set of rules can govern every engine that needs it.

Rules were called instructions

The dashboard calls them rules and groups them into rulesets. The REST API still exposes an individual rule at /instructions with its field names unchanged - what changed is where a rule is written: rulesetId replaced ownerEngineId.

How it works#

A ruleset belongs to your organization, not to an engine. Attaching it to an engine is what makes its rules apply - nothing is copied onto the engine.

ObjectFields
RulesetName, description. Holds any number of rules.
RuleName, target locale (or *), text.

When a translation request arrives, the engine collects every rule in every attached ruleset whose target locale matches the request's targetLocale and includes them in the LLM prompt alongside the brand voice and glossary. Rules don't compete: all matching rules are included, ordered best-matching-locale first so the tightest guidance leads.

FieldDescription
NameA short label identifying the rule (e.g., "German formal address")
Target localeThe locale this rule applies to, or * for all locales
TextThe linguistic rule, written in natural language

Many rules per locale

Create as many rules as a locale needs. Each rule should address one concern - that is what makes it individually testable, scorable by the rules AI review, and safe to delete.

Rulesets are organization-owned#

ActionEffect
Create a rulesetIt exists at organization level and applies to nothing until attached
Attach it to an engineEvery rule in it applies to that engine's translations
Attach it to several enginesThe same rules govern all of them - edit once, every engine follows
Attach several rulesets to one engineAll their rules combine
Detach it from an engineThe engine stops applying it. The ruleset and its rules are kept.
Delete a rulesetRefused while any engine still applies it - detach first. Deleting takes its rules with it.
Delete an engineRulesets and rules survive. They belong to the organization, not the engine.

Manage rulesets under Rules in the organization sidebar. An engine's Rules tab lists what that engine currently applies and attaches or detaches rulesets.

Predefined instructions#

Lingo.dev curates a catalog of ready-made rules - locale conventions most teams need and few think to write down. Open Predefined Instructions from an engine's Rules tab and pick the ones you want. They attach to the engine directly rather than through a ruleset, and you can detach them at any time.

Curated rules are placed in the prompt before your own, so a rule you write refines or overrides the baseline instead of fighting it.

Rules vs. brand voices#

Both shape translation output, at different levels:

Brand VoiceRule
ScopeOverall tone, style, formalityOne specific linguistic rule
Per localeOne text per locale, one voice per locale per engineMany rules per locale
AppliedThe single best-matching textEvery matching rule combines
WildcardYes (* acts as the default voice)Yes (* applies to all locales)
Example"Use informal du, technical tone""Always abbreviate Straße to Str. in addresses"

Use a brand voice to define how your product speaks in a language - formality, register, sentence style.

Use rules to encode specific conventions the model would otherwise miss - abbreviations, punctuation, unit formatting, or locale-specific grammar patterns.

They work together: the brand voice sets the voice, rules handle the edge cases.

Writing effective rules#

Each rule should be a single, unambiguous instruction. The engine includes the full text in the LLM prompt, so clarity matters.

Good rules#

text
Always use the Oxford comma in English lists.
text
In Japanese, use full-width parentheses ()instead of half-width ().
text
For German addresses, abbreviate "Straße" to "Str." and
"Nummer" to "Nr."
text
When translating percentage values for French, add a
non-breaking space before the percent sign: 42 %.

What to avoid#

  • Vague guidance that overlaps with the brand voice ("be more casual") - put that in the brand voice instead
  • Multiple unrelated instructions in one rule - split them so each can be tested independently
  • Rules that contradict the glossary - glossary terms take precedence in the engine's hierarchy

Wildcard locale#

Set the target locale to * to apply a rule across all locales. Useful for language-independent conventions:

text
Never translate product feature names: "Smart Compose",
"Quick Actions", "Flow Builder".
text
Preserve Markdown formatting in all translated strings.
Keep bold (**), italic (*), and link syntax [text](url) intact.

Locale-specific rules and wildcard rules are both included when the engine processes a request - they combine, not override.

Using rules with the API#

Rules are applied automatically when you call the localize endpoint. The engine collects every rule matching the request's targetLocale (plus any * rules) from the rulesets the engine applies. No additional parameters are needed.

CallPurpose
POST /rulesetsCreate a ruleset for the organization
GET /organizations/:id/rulesetsList the organization's rulesets with rule and engine counts
GET /rulesets/:id/rulesList a ruleset's rules
POST /instructions with rulesetIdAdd a rule to a ruleset
PUT /engines/:id/rulesetsReplace the set of rulesets an engine applies
DELETE /engines/:id/rulesets/:rulesetIdStop applying one ruleset to an engine
GET /engines/:id/instructionsList every rule an engine currently applies

ownerEngineId on POST /instructions still works - it writes into the engine's own ruleset, creating one if the engine has none. Prefer rulesetId.

Access#

org:ruleset:read and org:ruleset:edit govern rulesets and the rules inside them; attaching one to an engine also needs engine:edit on that engine. A per-ruleset grant gives someone read and edit on a single ruleset instead of every ruleset in the organization. See Roles & Permissions.

Managing rules via MCP#

If you use the Lingo.dev MCP server, your AI coding assistant can create, update, and delete rules and rulesets directly:

text
"Create a ruleset called German conventions and apply it to
the marketing engine."
text
"Add a rule to that ruleset: always abbreviate Straße to Str.
in addresses."
text
"Add a wildcard rule: never translate the term Smart Compose."

Next Steps#

Brand Voices
Define overall tone and formality per locale
Glossaries
Map source terms to exact translations per locale
AI Reviewers
Validate that rules are being followed
API Reference
Integrate the localization API into your workflow

Was this page helpful?

Max PrilutskiyMax Prilutskiy·Updated about 2 hours ago·5 min read