Skip to content

Translate labels

Blueprint labels are plain text by default and display exactly as written. To translate a label, wrap it in double braces. The text inside the braces is looked up in the workspace lexicon, a set of translations that lives outside blueprints:

name: '{{Product}}'
attributes:
- code: price
name: '{{Price}}'
value_type: number
views:
detail:
type: tabs
tabs:
- {label: '{{Overview}}', children: [{type: field, field: price}]}

In YAML, quote a label that starts with {{, as above; unquoted, YAML reads the braces as a mapping.

A user whose interface is set to Polish sees the Polish entry for Product. If there is none, they see the English entry, and if that is missing too, the text inside the braces. An untranslated label therefore still reads correctly in English.

Because the lexicon is separate from blueprints, you can fix a translation or add a language without publishing a new blueprint revision. Translations follow the user’s interface language. They do not depend on the selected context, which chooses catalog values, not labels.

Label Where
Blueprint name name
Blueprint description description
Attribute name name of an inline attribute in attributes
Attribute description description of an inline attribute in attributes
Reusable attribute name name in its definition
Status option label label of each option in an x-attricat-status annotation, on inline and reusable attributes
Choice label Each label in an x-attricat-enum-labels map, on inline and reusable attributes
Pattern hint x-attricat-pattern-hint in a value schema, on inline and reusable attributes
Tab and accordion section label label in tabs and accordion blocks
Table column heading label in views.table.columns
Incoming relationship link label in incoming_relationship_list

Other text, such as heading and text blocks, display separators, and catalog values, is always shown as written.

A status or a choice list stores a stable code, such as live, and shows its option label. Translate the label like any other:

"options": [
{ "code": "draft", "label": "{{Draft|status}}" },
{ "code": "live", "label": "{{Live}}", "tone": "success" }
]

Choice labels in x-attricat-enum-labels work the same way. Status chips, the status or choice select on the record page and create form, the Explorer’s filter value list and filter pills, and plain-text values all show the translated label, with the same fallback as other labels. Searches, filters, saved searches, the API, and exports keep using the code, so translating or rewording a label never changes stored data. A context such as {{Draft|status}} keeps a status called “Draft” apart from other uses of the word.

System tags come from workflows, agents, extensions, and API clients rather than blueprints, so they rarely contain braces. Each tag is therefore looked up in the lexicon as a key itself: give the tag needs-review an entry with the key needs-review, and record pages, the Explorer’s System tags column, the Tag filter list, and its filter pills show the translation, with the same fallback as other labels. A tag that contains {{ is read as text with references instead, like a label. Typing in the Tag filter matches the stored tag or its translation. Filters, saved searches, the API, and exports keep the stored tag.

Tags that Attricat sets itself, such as attricat.needs_attention, come translated into every interface language (“Needs attention”). A lexicon entry with the tag as its key replaces that wording in your workspace.

The report does not read system tags: a tag without a translation is not listed as untranslated, and an entry used only by tags is listed as orphaned and marked Unused.

Write Meaning
{{Product}} Translate Product.
{{Order|purchase}} Translate Order in the purchase sense. The part after | is a context and is never displayed.
SKU {{Price}} Literal text around a reference is kept as is.
\{{ A literal {{.
Brand™ No braces: shown as written, never translated.
  • Keys are English text. The text inside the braces is both the lookup key and the English fallback. Leading, trailing, and repeated spaces are ignored, but case matters: Product and product are separate keys.
  • Shared terms are translated once. Every blueprint that uses {{Price}} shows the same translation.
  • Use a context for homonyms and grammar. {{Order|purchase}} and {{Order|sorting}} are separate entries, as are words that need a different grammatical gender in another language. A reference with a context never falls back to the entry without one.
  • Wrap the whole phrase. Write "{{Products in this category}}", not "{{Products}} in this category". Word order, case, and gender differ between languages, so translators need the full phrase.

Saving a blueprint fails if a translated label contains a malformed reference: an unclosed {{, empty braces, an empty context, more than one |, or a brace inside a reference.

Translations are workspace data. Anyone who can read the catalog loads them; changing them requires blueprints.write.

In the web app, open Manage → Translations and choose a language. The page lists the labels that still need a translation in that language, including missing plural forms, each with a button that opens the translation form with the key already filled in. Below it, every entry for the language is shown with its source; entries no blueprint uses any more are marked Unused. You can add, edit, and delete entries there, and import or export a whole language. Changes apply across the app immediately.

The same operations are available from the CLI:

Terminal window
acli lexicon set --key Product --language pl --text Produkt
acli lexicon set --key Order --context purchase --language pl --text Zamówienie
acli lexicon list --language pl
acli lexicon delete --key Order --context purchase --language pl

To work on a whole language at once, export it, edit the file, and import it:

Terminal window
acli lexicon export --language pl > pl.json
acli lexicon import --file pl.json # add and update entries
acli lexicon import --file pl.json --replace # also delete entries missing from the file

Import files can also be written in YAML (use a .yaml or .yml extension):

format_version: 1
language: pl
entries:
- key: Product
text: Produkt
- key: Order
context: purchase
text: Zamówienie

Languages are BCP 47 tags such as pl, de, or pt-BR. See the CLI reference for every option. The web app currently offers English and Polish as interface languages.

An English (en) entry replaces the displayed English text without changing the key, so existing translations stay attached:

Terminal window
acli lexicon set --key Product --language en --text Item

Use this to rename a label or fix a typo. Change the key in the blueprint only when the meaning changes, and then translate the new key.

Labels without a number, such as tab labels and column headings, use separate keys for singular and plural wording: {{Product}} and {{Products}}.

Where the app shows a number of records, such as the result total in the Explorer, it can use the blueprint name in the correct form for that number: “1 Produkt”, “3 Produkty”, “5 Produktów”. For this, give the blueprint name’s entry one form per plural category of the language:

Terminal window
acli lexicon set --key Product --language en --plural-category one --text Product
acli lexicon set --key Product --language en --plural-category other --text Products
acli lexicon set --key Product --language pl --plural-category one --text Produkt
acli lexicon set --key Product --language pl --plural-category few --text Produkty
acli lexicon set --key Product --language pl --plural-category many --text Produktów
acli lexicon set --key Product --language pl --plural-category other --text Produktu
Language Plural categories
English, German, Dutch, Swedish one, other
French, Spanish, Italian, Portuguese one, many, other
Polish, Czech, Slovak, Ukrainian, Russian one, few, many, other
Japanese, Chinese, Korean other

An entry without a plural category uses other. A form contains only the noun; the app places the number. When an entry has plural forms, labels without a number use its one form, so write the forms with the capitalization your labels use. Until a blueprint name has plural forms, the app keeps its generic wording, such as “5 results”.

Terminal window
acli lexicon report
acli lexicon report --language pl --language de

The report lists, per language:

  • Untranslated references used by catalog labels that have no entry in that language. English is never listed here because the key is the English text.
  • Missing plural categories for blueprint names (which the app shows with counts) and for any entry that already has plural forms. For English, this is where missing one and other forms appear.

It also lists orphaned entries whose key and context no longer appear in any blueprint revision or reusable attribute. Review them before deleting: older revisions that records still use count as in use.

A solution pack can ship translations. Applying the pack adds its entries to the lexicon. Entries the workspace has written, before or after installation, always take precedence: a pack never overwrites them, and editing an entry the pack supplied makes it a workspace entry. A newer release of the pack can update the entries it supplied that nobody has edited.