In Angular, refer to a locale with a Unicode locale identifier such as en-CA or fr-FR. Choose a tag that matches both the language and regional conventions your users need, then configure the app’s LOCALE_ID and ensure the corresponding locale data is available. Locale choice affects formats such as dates, numbers, percentages and currency; it is not merely a language label.
What an Angular locale ID means
Angular locale IDs are based on Unicode locale identifiers, which use conventions from BCP 47 and Unicode CLDR. The regional part can distinguish conventions within the same language: en-CA is English for Canada, while en-US is English for the United States; similarly, fr-CA and fr-FR identify French for Canada and France. Angular uses the identifier to find locale data for internationalization of text strings and formatting.
As an Amazon Associate I earn from qualifying purchases.
Those distinctions can affect grammar, punctuation, dates, decimal separators and currency conventions. Select the locale that matches the intended audience rather than assuming one language tag is suitable for every region. Angular’s guide explains the identifier conventions and examples in Refer to locales by ID.
Which locale setting should you use?
Angular has related locale settings for different purposes. The build’s source locale identifies the original language of the application; the LOCALE_ID provider supplies the application locale used by Angular’s documented runtime features. A pipe can also receive an explicit locale for an individual formatting operation.
#1 Best Overall
| Setting | What it controls | Where to configure it |
|---|---|---|
| Source locale | The source language of the application for the localization build workflow | The i18n section of angular.json; Angular documents en-US as the default source locale. See the locale-ID guide. |
LOCALE_ID |
The application locale used by Angular’s documented locale-sensitive pipes, ICU expressions and i18n extraction | Provide the token in application providers or during module-based bootstrap. See the token reference. |
| Pipe-level locale | A one-operation override when a particular formatting result should use another locale | Pass a locale argument to CurrencyPipe. See Format data based on locale. |
These settings are not interchangeable: use the source locale for the build’s source-language configuration, the provider for the app-wide locale, and a pipe override only when a specific operation intentionally differs.
Set the application locale with LOCALE_ID
Provide LOCALE_ID with the desired locale string. For example, this provider sets the app locale to Canadian English:
Rank #2
{ provide: LOCALE_ID, useValue: 'en-CA' }
In a standalone application, put the provider in the application providers. In a module-based application, provide the token in the bootstrap configuration, following the pattern in Angular’s LOCALE_ID API reference. Replace en-CA with the identifier appropriate for your users.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsWhat LOCALE_ID changes in formatting
Angular documents DatePipe, CurrencyPipe, DecimalPipe and PercentPipe as using LOCALE_ID. The token also applies to ICU expressions and i18n extraction. If only one currency display needs a different locale, provide that locale directly to CurrencyPipe; that explicit argument overrides the app-wide token for that call. Angular describes these behaviors in Format data based on locale.
Rank #3
Make locale data available
Angular includes en-US locale data initially. When using Angular’s localized CLI builds with --localize, the CLI automatically includes locale data and sets LOCALE_ID for the localized build. The documented command is:
ng build --localize
For other use cases, Angular provides global locale variants under @angular/common/locales/global. For example, to import the global French variant:
Rank #4
import '@angular/common/locales/global/fr';
Angular also provides registerLocaleData for registering locale data for Angular’s internal use. Choose the appropriate approach for the app’s build and runtime setup; see the official guides for global locale variants and the registerLocaleData API.
Free tools Windows power users keep installed
One-click scans. No signup required.
Choose and verify a locale
- Identify the audience’s language and region. Decide whether the product needs a regional variant such as
en-CArather than a broader or different English locale. - Set the source locale if you are configuring localization builds. Use the workspace
i18nconfiguration inangular.json. - Provide the app locale. Set
LOCALE_IDto the selected identifier where the application is configured. - Load the needed data. Use the localized build workflow or an applicable locale-data import or registration.
- Check representative output. Verify dates, numbers, percentages, currency, punctuation and language conventions against the expectations of the intended audience.
Angular’s documentation defines the available configuration mechanisms, but it does not prescribe a locale for a particular product or market. Confirm the output against the conventions your application actually needs.
Use Intl rather than relying on getLocaleId for new i18n work
Angular’s getLocaleId API reference marks the function deprecated since v18.0 and recommends the JavaScript Intl API for internationalization. For new i18n code, consult the getLocaleId API reference and use Intl where appropriate rather than treating getLocaleId as the preferred modern approach.
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.




