Label packs
Lily ships no English defaults, so the grid-like helpers used to need a hundred-odd strings written and translated by every app. A label pack is that work done once, for 46 locales.
What a pack holds
One JSON file per locale in shared/label-packs/ holds the labels for data-grid, kanban-board, calendar, gantt-chart and filter — names for controls, live-region announcements, export headers,
the filter's operator names. About 185 strings each. Strings that take values are templates with {placeholders}; wording that depends on a value (ascending or descending, collapsed or
expanded, a dependency type) is an object keyed by that value.
Loading a pack
- Svelte, React, Vue, Angular, HTML, Web Components —
labelsFor("data-grid", pack)returns a readylabels. - Nunjucks —
nunjucksLabelsFor("kanban-board", pack)returns{ macro, client }: passmacroas the macro'slabelsandclientas the client'slabelsoption. - Blazor —
LabelPack.FromJson(json).ToDataGridLabels(), andToKanbanLabels(),ToCalendarLabels(),ToGanttLabels(),ToFilterLabels()in their packages.
A key a pack lacks leaves that label unset — the control is unnamed, and the helper says so in development — rather than
showing text from another language. Labels that depend on how a locale writes dates (weekday names, period titles, the
Gantt column label) are not in a pack: build them with Intl.
Read this before shipping a pack
Only English is reviewed. The other 45 packs are machine drafts, marked "reviewed": false in the file, and
a native speaker should check them — screen-reader names and announcements most of all — before a product relies on
them. Welsh, which most deserves a careful read, is among the drafts. The packs are not yet published as an npm or
NuGet package; copy the file you need from the repository.
The 46 locales
ar, bg, bh, bn, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, ga, gu, ha, hi, hr, hu, id, it, ja, jv, ko, lt, lv, mr,
mt, nl, pa, pl, pt, ro, ru, sk, sl, sv, ta, te, tr, ur, vi and zh — each as <code>-001. (Bhojpuri keeps
the requested tag bh; its ISO code is bho.)
The full contract is in the label-packs specification.