Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
In Angular, refer to a locale with a Unicode locale identifier such as en-CA or fr-FR. Choose a language-and-region ID that matches the audience, then configure the app’s LOCALE_ID and ensure the corresponding locale data is available. This affects Angular’s locale-sensitive pipes and ICU expressions; localized CLI builds can also set the locale for each build.
What an Angular locale ID means
A locale ID identifies language and regional conventions—not just a language. Angular bases its locale identifiers on Unicode CLDR and BCP 47 tags. For example, en-CA represents English in Canada, while en-US represents English in the United States; fr-CA and fr-FR distinguish French in Canada and France. These variants can differ in dates, number punctuation, currency, and language conventions. See Angular’s locale ID guide.
Select the ID that reflects the audience’s language and region, then verify the resulting formats against the product’s requirements. Angular’s documentation does not prescribe one locale for a particular market or application.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How locale settings fit together
Angular uses locale information in more than one place. The source locale is a build configuration choice, while LOCALE_ID is an application provider. A pipe can also receive a locale argument for an individual formatting operation.
#1 Best Overall
- Source locale: Angular documents
en-USas the default source locale. ConfiguresourceLocalein the workspacei18nsection ofangular.json. This identifies the source language for localization workflows. See Refer to locales by ID. - Application locale:
LOCALE_IDprovides the locale Angular uses for documented extraction, ICU expressions, and locale-sensitive pipes. See the LOCALE_ID API reference. - Per-operation locale: The
CurrencyPipeaccepts a locale argument that overrides the application token for that formatting call. Use it when one value intentionally needs different conventions from the rest of the app. See Format data based on locale.
Set the application locale with LOCALE_ID
Provide LOCALE_ID with the locale ID appropriate to the application. Angular’s documented provider form is:
{ provide: LOCALE_ID, useValue: 'en-US' }
In a standalone application, put the provider among the application providers. In a module-based application, provide it during bootstrap. The exact surrounding configuration depends on the application structure; the token itself is provided in the same way.
Rank #2
The built-in DatePipe, CurrencyPipe, DecimalPipe, and PercentPipe use LOCALE_ID when formatting data. Angular’s formatting guide documents these pipes and the currency pipe’s locale override.
Make locale data available
Angular includes en-US locale data initially. For other locales, include the relevant data in the application or use Angular’s localization build workflow. The global locale variants guide documents both approaches.
Rank #3
For localized CLI builds
Angular’s CLI --localize option automatically includes locale data and sets LOCALE_ID for localized builds. The guide shows this command:
ng build --localize
For a global locale variant
To import the global French variant, Angular documents:
Rank #4
import '@angular/common/locales/global/fr';
For explicit registration
Angular provides registerLocaleData to register locale data for internal Angular use. Consult the registerLocaleData API reference for the current signature and usage details.
Choose an ID by checking actual output
Before settling on a locale, check representative dates, decimal and percentage values, currencies, punctuation, and language-name conventions for the intended audience. Similar-looking IDs can produce meaningfully different output: a language-only choice does not capture the same regional distinction as IDs such as en-CA and en-US. Keep the source locale, app-wide locale, and any deliberate pipe-level exception aligned with the behavior the application needs.
Do not build new code around getLocaleId
Angular marks the getLocaleId API deprecated since v18.0 and recommends relying on the JavaScript Intl API for internationalization. Check the getLocaleId API reference before using it in an existing codebase, and follow the API guidance for the Angular version installed in the project.
Quick Recap
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.

