From the root of your Angular workspace, run ng add @angular/localize. The Angular CLI adds the package and updates TypeScript configuration so Angular’s localization features are available. This setup does not create translations or configure localized builds; those are separate steps.
Add the package
-
Open a terminal in the root directory of your Angular workspace.
As an Amazon Associate I earn from qualifying purchases.
-
Run
ng add @angular/localize. The Angular CLI schematic adds the package todevDependenciesby default, addstypes: ["@angular/localize"]to TypeScript configuration files, and adds/// <reference types="@angular/localize" />at the top ofmain.ts. Angular’s package setup guide documents these changes.Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
When to use the runtime option
If your application needs $localize at runtime, run ng add @angular/localize --use-at-runtime. With this option, the package is placed in dependencies rather than the default devDependencies. In a workspace with multiple projects, add --project followed by the project name to select the project for the schematic.
#1 Best Overall
What installation sets up—and what it does not
Installing the package enables Angular localization features, but it is only one part of preparing an application for multiple locales. Angular distinguishes internationalization—the preparation of a project for use in different locales—from localization, which builds project versions for those locales. The broader workflow includes configuring locales, extracting text for translation, and building localized variants. Angular’s internationalization overview explains the distinction.
Configure locales and translations
Choose locale identifiers
Angular locale IDs use Unicode locale identifiers based on BCP 47 tags. The source locale defaults to en-US; choose the source and target locales deliberately because regional variants can use different formatting conventions. Angular’s locale-ID guide describes the identifiers.
Rank #2
Extract text and select a translation format
Use ng extract-i18n to generate a source translation file from the application’s marked text. Angular documents ARB, JSON, XLIFF 1.2, XLIFF 2, and XMB extraction formats. The command supports options including --format, --out-file, and --output-path; consult the translation-file guide for their usage and configuration.
Free tools Windows power users keep installed
One-click scans. No signup required.
Build localized variants
In the workspace build configuration, define the source and target locales, associate target locales with their translation files, and configure the locale variants to build. Then use ng build --localize to produce localized builds. Angular includes the necessary locale data for this build option; the initial installation includes en-US. Locale data is provided by @angular/common, with global locale variants available under @angular/common/locales/global. The localized-build guide covers the configuration and build process.
Rank #3
Test a localized development build
Angular’s development server supports one localized locale at a time. If you need to work with multiple locales, build the localized variants with the configured build process rather than expecting the development server to serve them all simultaneously. See Angular’s localized-build guidance.
Quick Recap
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




