Skip to main content
Angular Internationalization

Internationalization Overview

Estimated Time: 2 hours | Difficulty: Intermediate | Prerequisites: Components, Routing
Internationalization (i18n) is the process of designing your application to support multiple languages and locales. Think of it like building a house with interchangeable wall panels — the structure stays the same, but the surfaces can swap out depending on who is living there. Localization (l10n) is the actual process of creating those panels for each locale. Angular provides built-in i18n tools and also supports third-party libraries like ngx-translate and Transloco. The choice between them is one of the most consequential architectural decisions you will make early in a project, because switching later is extremely painful — every template and every string literal gets touched.
Choose early, or pay later. Retrofitting i18n onto an existing app means touching every template in your codebase. If there is even a 20% chance your app will need multiple languages, set up the i18n infrastructure on day one, even if you only ship one language initially.

Built-in Angular i18n

Setup

Marking Text for Translation

Translation File (messages.xlf)

Build Configuration


Setup

Configuration

Translation Files

Using Transloco in Components

Language Switcher

Scoped Translations (Lazy Loading)


Locale-Aware Formatting

Number, Date, and Currency Formatting


RTL (Right-to-Left) Support


Best Practices

Use Translation Keys

Use meaningful, hierarchical keys like products.details.price

Avoid Concatenation

Never concatenate translated strings - use placeholders instead

Handle Plurals Properly

Use ICU message format for pluralization

Lazy Load Translations

Load feature-specific translations on demand
Practical tip: Never embed punctuation (periods, exclamation marks, colons) outside of translation strings. Languages use different punctuation — French puts a space before colons, Spanish uses inverted question marks, and Japanese uses different full stops. Let the translator handle all punctuation inside the translated string.

Next: Accessibility (a11y)

Build accessible Angular applications for all users