Skip to content
Angular + langctl

Angular i18n Made
Developer-Friendly

Manage translations for your Angular app directly from the terminal. Works with JSON-based libraries like ngx-translate and Transloco.

Angular i18n Pain Points

Angular i18n comes with workflow challenges. Translation files multiply with every language, new strings have to reach translators without overwriting their work, and integrating translation updates into your build process often means custom scripting.

Common Challenges

  • • Managing one translation file per language by hand
  • • Keeping translation IDs consistent
  • • Merging new strings without losing existing translations
  • • Integrating with CI/CD pipelines

With langctl

  • ✓ Upload new source strings with one command
  • ✓ Consistent key management across all languages
  • ✓ Push adds new keys without overwriting existing translations
  • ✓ Single command for CI/CD integration

Angular i18n Workflow

1

Initialize in Your Angular Project

langctl init asks for your API key, project, file format and path, and writes a langctl.json to commit. Point it at the folder your loader reads, such as src/assets/i18n.

$ cd your-angular-project
$ langctl init --project web-app --format json --output "src/assets/i18n/{lang}.json"
✔ Wrote langctl.json for Web App (en, es, fr)
2

Push Your Source Strings

Add keys to your source-language file as you use them in templates, then upload the new ones. Existing translations are left alone.

$ langctl push
en src/assets/i18n/en.json 12 new, 0 updated, 68 unchanged
3

Manage Translations

Translators work in the dashboard, or you add translations from the CLI. langctl tracks which keys need translation across all your target languages.

$ langctl projects stats web-app
web-app 80 keys 80 published 0 draft
LANG TRANSLATED DONE
en 80/80 100%
es 72/80 90%
fr 68/80 85%
4

Pull into Your App

Pull writes one JSON file per language where your loader expects it. Only published keys are included.

$ langctl pull
= src/assets/i18n/en.json unchanged
~ src/assets/i18n/es.json updated 72/80 translated
~ src/assets/i18n/fr.json updated 68/80 translated

Works With Your Angular Setup

Transloco

Runtime i18n library for Angular. langctl writes the JSON files its loader reads from assets/i18n.

  • ✓ Nested JSON (nested-json)
  • ✓ One file per language
  • ✓ {{param}} interpolation kept as-is

ngx-translate

Popular third-party i18n library. langctl outputs JSON files compatible with ngx-translate's loader.

  • ✓ Flat and nested JSON export
  • ✓ Works with the translate pipe and TranslateService
  • ✓ Parameter interpolation

CI/CD Integration

Integrate translation checks into your Angular build pipeline. Catch stale files and missing translations before they reach production.

# .github/workflows/ci.yml
- name: Check translations
run: npx langctl@0 pull --check --require-complete
env:
LANGCTL_API_KEY: ${{ secrets.LANGCTL_API_KEY }}
- name: Build Angular app
run: ng build

Start Managing Angular Translations Today

Free to get started. Works with Angular 12+ projects.