Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

OpenAPI Spec Localization Example

Demonstrates localizing an OpenAPI specification with the Lingo.dev CLI (@lingo.dev/cli) push/pull flow. Human-readable text — titles, summaries, and descriptions — is translated, while paths, operation IDs, schema field names, enums, and types stay untouched.

Full walkthrough: lingo.dev/en/guides/static-content

What's inside

  • spec/en/openapi.yaml — source OpenAPI 3.1 spec (English)
  • .lingo/config.json — Lingo.dev CLI configuration (yaml-openapi format)

Quick start

# 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 --wait

Translations are committed per locale under spec/<locale>/openapi.yaml. This repo ships fully translated. After you edit the English spec, 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.

How it works

The yaml-openapi format understands the OpenAPI shape: lingo push translates only human-facing fields — info.title/description, tag descriptions, operation summary/description, parameter and response descriptions, and schema/property descriptions. Structural content — paths, operationId, property names, enum values, $refs, and types — is preserved. Results are written per locale into spec/<locale>/.

Automate in CI (optional)

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.

Locales

  • Source: en
  • Targets: es, fr, de

Links

About

Demonstrates localizing an OpenAPI spec with the Lingo.dev CLI push/pull flow

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors