Angular
720K weekly downloads

Angular Localization with @angular/localize

Official Angular i18n solution. Build-time translation. ICU MessageFormat. Designed for enterprise applications with strict i18n requirements.

Prerequisites

  • Angular 17+ application
  • Node.js 18+
  • Angular CLI

Common Challenges

Problems developers face when localizing Angular apps—and how IntlPull helps.

Build-Per-Locale

Separate build for each locale. Build times multiply. Deployment complexity increases.

No Runtime Switching

Can't switch locale without page reload. Each locale is a separate app.

XLIFF Complexity

XLIFF is verbose XML. Not developer-friendly for manual editing. Need proper tooling.

@angular/localize Features

Why @angular/localize is a great choice for Angular localization.

Build-Time Translation

Translations compiled into build. Zero runtime overhead. One build per locale.

vs runtime loading

ICU MessageFormat

Full ICU syntax support. Complex plurals, selects, and rich formatting.

vs basic interpolation

CLI Integration

ng extract-i18n generates XLIFF/XMB. ng build with localize flag creates locale bundles.

vs manual extraction

Attribute Translation

i18n attribute on elements. i18n-title, i18n-placeholder for attribute translation.

vs text-only solutions

Date/Number Pipes

DatePipe, CurrencyPipe, DecimalPipe are locale-aware out of the box.

vs external formatters

Enterprise Ready

XLIFF format support. Translation agency workflows. Auditable extraction.

vs casual i18n

Quick Setup

Get @angular/localize running in your Angular project.

1

Add Localize Package

Install the Angular localize package.

ng add @angular/localize
2

Mark Text for Translation

Use i18n attribute on template elements.

<h1 i18n="@@welcomeHeader">Welcome to our application</h1>
<p i18n="@@welcomeDesc">This is the welcome page description.</p>

<!-- With meaning and description -->
<button i18n="submit button|Button to submit the form@@submitBtn">
  Submit
</button>

<!-- ICU plural -->
<p i18n="@@itemCount">
  {count, plural,
    =0 {No items}
    =1 {One item}
    other {{{count}} items}
  }
</p>
3

Extract Messages

Generate translation source file.

ng extract-i18n --output-path src/locale --format xlf
4

Configure Builds

Set up locale builds in angular.json.

{
  "projects": {
    "your-app": {
      "i18n": {
        "sourceLocale": "en",
        "locales": {
          "es": "src/locale/messages.es.xlf",
          "fr": "src/locale/messages.fr.xlf"
        }
      },
      "architect": {
        "build": {
          "options": {
            "localize": true
          }
        }
      }
    }
  }
}
5

Build for Locales

Generate builds for all locales.

ng build --localize

IntlPull Integration

Connect IntlPull to manage translations professionally.

1

Install IntlPull CLI

Add the CLI for translation management.

npm install -D @intlpull/cli
2

Push Source Messages

Upload extracted XLIFF to IntlPull.

npx intlpull push --source ./src/locale/messages.xlf --format xliff
3

Pull Translations

Download translated XLIFF files.

npx intlpull pull --format xliff --output ./src/locale
4

Automate in CI

Add translation sync to your pipeline.

# .github/workflows/build.yml
jobs:
  build:
    steps:
      - run: ng extract-i18n --output-path src/locale
      - run: npx intlpull push --source ./src/locale/messages.xlf --format xliff
      - run: npx intlpull pull --format xliff --output ./src/locale
      - run: ng build --localize

Frequently Asked Questions

Ready to Localize Your Angular App?

Start with our free tier. No credit card required.

    Angular Localization Guide | IntlPull | IntlPull