Carlos Cifuentes
AngularJS library migration · internationalization

Migrating angular-translate to modern Angular

angular-translate handled translations in AngularJS with JSON files, a translate filter and a directive.

What replaces it

OptionWhen to choose it
TranslocoRuntime language switching with lazy-loaded translation files; actively maintained.
ngx-translateThe most similar API to angular-translate: same pipe and JSON files.
Angular built-in i18nWhen one build per language is acceptable and you want compile-time translations.

How to migrate it

  1. Keep your JSON translation files: Transloco and ngx-translate can read the same structure.
  2. Load the same files from both frameworks during the hybrid phase so the two sides never show different text.
  3. Replace the translate filter and directive screen by screen; check interpolation syntax and pluralization.

Watch out. Missing-key behavior differs between libraries. Decide early what a missing translation shows, and add a check in CI for unused and missing keys.

Other libraries

Planning a migration or a micro-frontend platform?

In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.

Message me on LinkedIn