Locale data for 'en-US' cannot be found.
See original GitHub issueπ Docs or angular.io bug report
Description
Issue first reported in 35776, referring to a stack overflow issue. The developer is getting this error message:
Locale data for 'en-US' cannot be found. No locale data will be included for this locale when running ng build --configuration=prod --localize
π¬ Minimal Reproduction
See the stack overflow issue.
Whatβs the affected URL?**
https://angular.io/guide/i18n#internationalization-i18nReproduction Steps**
See the stack overflow issue.
Expected vs Actual Behavior**
βThe documentation clearly states en-US is imported by default. To make things worse, when i change sourceLocale to any other language (say βdeβ), warning message goes away. Manually registering en-US locale data doesnβt help either.β
π·Screenshot
π₯ Exception or Error
`Locale data for 'en-US' cannot be found. No locale data will be included for this locale.`
π Your Environment
Browser info
Anything else relevant?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Angular 9 Locale data for 'en-US' cannot be found. No locale ...
It is working if you set sourceLocale to en . But i cant figure out why the default value en-US dosnt work. "i18n":...
Read more >12 Customizing Locale Data - Oracle Help Center
This chapter shows how to customize locale data. ... If you cannot find a Unicode font with satisfactory character coverage, then use multiple...
Read more >Unicode Locale Data Markup Language (LDML)
Unicode language and locale identifiers inherit the design and the repertoire of subtags from [BCP47] Language Tags. There are some extensions and restrictionsΒ ......
Read more >Internationalization | NG-ZORRO - Ant Design
import all locales data **/ import { LOCALE_ID } from '@angular/core'; ... from 'ng-zorro-antd/i18n'; import { enUS, ja } from 'date-fns/locale';Β ...
Read more >Locale | Apple Developer Documentation
Data formatting APIs commonly make use of locales to present data in a ... let enUS = Locale(identifier: "en-US") let localizedScript = enUS....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems that this problem has been fixed in ng 10, I am trying to migrate old projects to ng 10.
Hi,
I have migrate from angular 8 to 9 and i have the same issue. My version : 9.1.11
The error message : Locale data for βfr-FRβ cannot be found. Using locale data for βfrβ.
In my app.module i have :
registerLocaleData(localeFr, 'fr-FR');
In my package.json :
"localize": ["fr-FR"],
When i change to βlocalizeβ: [βfrβ] i have the error message : Requested locale βfrβ is not defined for the project.
If i use :
All work fine
Maybe need to change the documentation at the line :
https://angular.io/guide/i18n
Thanks