W3cubDocs

/Angular 12

Import global variants of the locale data

The Angular CLI automatically includes locale data if you run the ng build command with the --localize option.

ng build --localize

The @angular/common package on npm contains the locale data files. Global variants of the locale data are available in @angular/common/locales/global.

import example for French

The following example imports the global variants for French (fr).

import '@angular/common/locales/global/fr';
Last reviewed on Wed Oct 13 2021

© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/guide/i18n-optional-import-global-variants