Error: Missing locale data for the locale "fr".
See original GitHub issueBug Report or Feature Request (mark with an x)
- [ X ] bug report
- [ ] feature request
Saw issue #6683 but it does not solve my problem
Versions.
Angular CLI: 1.5.0 Node: 6.11.5 OS: linux x64 Angular: 5.0.1 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router
@angular/cli: 1.5.0 @angular/platform-server: 4.3.6 @angular-devkit/build-optimizer: 0.0.32 @angular-devkit/core: 0.0.20 @angular-devkit/schematics: 0.0.35 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.0 @schematics/angular: 0.1.0 typescript: 2.4.2 webpack: 3.8.1
Repro steps.
I upgraded from Angular 4 to 5 and got this error in the browser when using the local FR. But it works perfectly with EN!
The log given by the failure.
ERROR Error: Missing locale data for the locale “fr”. Stack trace: findLocaleData@webpack-internal:///…/…/…/common/esm5/common.js:1561:11 getLocaleNumberFormat@webpack-internal:///…/…/…/common/esm5/common.js:1404:33 formatNumber$1@webpack-internal:///…/…/…/common/esm5/common.js:4999:35 DecimalPipe.prototype.transform@webpack-internal:///…/…/…/common/esm5/common.js:6106:18 checkAndUpdatePureExpressionInline@webpack-internal:///…/…/…/core/esm5/core.js:13095:33 checkAndUpdateNodeInline@webpack-internal:///…/…/…/core/esm5/core.js:13798:20 checkAndUpdateNode@webpack-internal:///…/…/…/core/esm5/core.js:13737:16 debugCheckAndUpdateNode@webpack-internal:///…/…/…/core/esm5/core.js:14609:55 debugCheckRenderNodeFn@webpack-internal:///…/…/…/core/esm5/core.js:14588:13 View_ChargersComponent_0/<@ng:///ChargersModule/ChargersComponent.ngfactory.js:350:47 debugUpdateRenderer@webpack-internal:///…/…/…/core/esm5/core.js:14573:12 checkAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:13709:5 callViewAction@webpack-internal:///…/…/…/core/esm5/core.js:14054:21 execComponentViewsAction@webpack-internal:///…/…/…/core/esm5/core.js:13986:13 checkAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:13710:5 callViewAction@webpack-internal:///…/…/…/core/esm5/core.js:14054:21 execEmbeddedViewsAction@webpack-internal:///…/…/…/core/esm5/core.js:14012:17 checkAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:13705:5 callViewAction@webpack-internal:///…/…/…/core/esm5/core.js:14054:21 execComponentViewsAction@webpack-internal:///…/…/…/core/esm5/core.js:13986:13 checkAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:13710:5 callViewAction@webpack-internal:///…/…/…/core/esm5/core.js:14054:21 execEmbeddedViewsAction@webpack-internal:///…/…/…/core/esm5/core.js:14012:17 checkAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:13705:5 callViewAction@webpack-internal:///…/…/…/core/esm5/core.js:14054:21 execComponentViewsAction@webpack-internal:///…/…/…/core/esm5/core.js:13986:13 checkAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:13710:5 callWithDebugContext@webpack-internal:///…/…/…/core/esm5/core.js:14936:39 debugCheckAndUpdateView@webpack-internal:///…/…/…/core/esm5/core.js:14473:12 ViewRef_.prototype.detectChanges@webpack-internal:///…/…/…/core/esm5/core.js:11496:9 ApplicationRef.prototype.tick/<@webpack-internal:///…/…/…/core/esm5/core.js:5982:58 ApplicationRef.prototype.tick@webpack-internal:///…/…/…/core/esm5/core.js:5982:13 next/<@webpack-internal:///…/…/…/core/esm5/core.js:5815:99 ZoneDelegate.prototype.invoke@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:392:17 onInvoke@webpack-internal:///…/…/…/core/esm5/core.js:4825:24 ZoneDelegate.prototype.invoke@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:391:17 Zone.prototype.run@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:142:24 NgZone.prototype.run@webpack-internal:///…/…/…/core/esm5/core.js:4642:54 next@webpack-internal:///…/…/…/core/esm5/core.js:5815:69 EventEmitter.prototype.subscribe/schedulerFn<@webpack-internal:///…/…/…/core/esm5/core.js:4419:36 SafeSubscriber.prototype.__tryOrUnsub@webpack-internal:///…/…/…/…/rxjs/_esm5/Subscriber.js:244:13 SafeSubscriber.prototype.next@webpack-internal:///…/…/…/…/rxjs/_esm5/Subscriber.js:191:17 Subscriber.prototype._next@webpack-internal:///…/…/…/…/rxjs/_esm5/Subscriber.js:132:9 Subscriber.prototype.next@webpack-internal:///…/…/…/…/rxjs/_esm5/Subscriber.js:96:13 Subject.prototype.next@webpack-internal:///…/…/…/…/rxjs/_esm5/Subject.js:66:17 EventEmitter.prototype.emit@webpack-internal:///…/…/…/core/esm5/core.js:4399:24 checkStable@webpack-internal:///…/…/…/core/esm5/core.js:4790:13 onHasTask@webpack-internal:///…/…/…/core/esm5/core.js:4838:21 ZoneDelegate.prototype.hasTask@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:445:21 ZoneDelegate.prototype._updateTaskCount@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:465:17 Zone.prototype._updateTaskCount@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:289:17 Zone.prototype.runTask@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:209:25 drainMicroTaskQueue@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:602:25 ZoneTask.invokeTask@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:503:21 invokeTask@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:1540:9 globalZoneAwareCallback@webpack-internal:///…/…/…/…/zone.js/dist/zone.js:1566:17
Desired functionality.
That the formatting works with local other than EN
Mention any other details that might be useful.
I’m using @ngx-translate/core for the translation service
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Related StackOverflow Question
From the docs: https://angular.io/guide/i18n#i18n-pipes
@clydin Does this also apply for
platform: serverand/or lazy-loaded routes? Cause I’m seeing the same errors when pre-rendering an Angular 5 application (following the config guide for Universal from the cli wiki).I’m building the Browser version like this:
ng build --target=production --environment=dev --progress=true --app=eu-browser --i18nFile=src/app-eu/i18n/messages.de.xlf --i18nFormat=xlf --locale=deAnd then building the Server version like this:
ng build --target=production --environment=dev --progress=true --app=eu-server --i18nFile=src/app-eu/i18n/messages.de.xlf --i18nFormat=xlf --locale=de --output-hashing=falseAnd yet I still see similar errors when running my pre-render task.
I had the same issue for “da-DK”. I found the solution here: https://github.com/angular/angular/issues/20286
Direct link to docs: https://angular.io/guide/i18n#i18n-pipes