Demonstrates localizing TypeScript locale modules with the Lingo.dev CLI (@lingo.dev/cli) push/pull flow. Each locale is a set of typed .ts modules that export plain string objects — the CLI translates the string values and leaves keys, structure, and as const untouched.
Full walkthrough:lingo.dev/en/guides/static-content
src/locales/en/*.ts— source locale modules (English).lingo/config.json— Lingo.dev CLI configuration (typescriptformat)
Each module has a default-exported object of UI strings:
exportdefault{appName: "Ledger",nav: {dashboard: "Dashboard",settings: "Settings"},}asconst;# 1. Install the CLI (or prefix commands with `npx`)
npm install -g @lingo.dev/cli
# 2. Authenticate and link this repo to your engine
lingo login
lingo link
# 3. Translate changed source into every locale
lingo push --waitTranslations are committed per locale under src/locales/<locale>/, mirroring the English modules. This repo ships fully translated. After you edit an English module, lingo push --wait translates only the delta. To bootstrap a brand-new locale, add it to .lingo/config.json and run lingo push --backfill-missing.
lingo push parses each source module, diffs it against .lingo/lock.json, and translates only the string literals through your linked engine. Object keys, nested structure, as const assertions, comments, and placeholders like {count} are preserved — only the translatable string values change. Results are written per locale into src/locales/<locale>/.
Because the output is plain typed TypeScript, your app imports each locale's modules directly — no runtime parsing, and the structure stays identical across locales.
Want translations on every push or PR without running the CLI yourself? See the CI/CD Workflows guide — the Lingo.dev GitHub App translates automatically once installed. The App reads engineId from the committed .lingo/config.json, so run lingo link and commit the updated file before installing it.
- Source:
en - Targets:
es,fr,de