Repository navigation
Open
Labels
angular/build:applicationangular/build:dev-serverarea: @angular/buildfreq1: lowOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Description
Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
I am start using the new angular builder and stuck with localizing an app. The texts are stayed in a source locale and the corresponding LOCALE_ID is not provided.
Minimal Reproduction
- git clone https://github.com/destus90/angular-esbuilder-kendo-localization
- npm install
- npm run start:fr
- Observe browser's console (the provided LOCALE_ID is 'en-US') and the texts are not translated into French
Exception or Error
No response
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.0.0
Node: 20.7.0
Package Manager: npm 10.1.0
OS: win32 x64
Angular: 17.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.0
@angular-devkit/build-angular 17.0.0
@angular-devkit/core 17.0.0
@angular-devkit/schematics 17.0.0
@schematics/angular 17.0.0
rxjs 7.8.1
typescript 4.9.5
zone.js 0.14.2
Anything else relevant?
No response
Reacted by amri04, Stefani Nikolova, Dimiter Madjarov, Georgi Slavov, Martin Bechev, Slavena Ilieva, Yanmario, Minko Gechev and pasekit
Metadata
Metadata
Assignees
Labels
angular/build:applicationangular/build:dev-serverarea: @angular/buildfreq1: lowOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Activity
fix(@angular-devkit/build-angular): correct set locale when using esb…
fix(@angular-devkit/build-angular): correct set locale when using esb…
fix(@angular-devkit/build-angular): correct set locale when using esb…
fix(@angular-devkit/build-angular): correct set locale when using esb…
dombioinfo commentedon Feb 25, 2025
Hi,
I encountered the same issue and I use angular 18. While this issue is not fixed, is there a way to avoid it ?
(In my case, the third library is kendoui).
gabrielcs23 commentedon Jun 24, 2025
I encountered the same issue when using Kendo UI as a third-party library, this time with Angular 19.
I forked @destus90’s repository to update Angular to v19 and Kendo UI to the version my team is currently using. Experimenting with
angular.jsonled to two different scenarios regarding the optimization configuration:First Scenario: optimization disabled in development (default)
When running
ng serve --configuration=fr(ornpm run start:fr), I confirmed thatLOCALE_IDwas indeed set to'fr', but the translation file was not loaded and the texts remained in English. Bundle generation time was around 4 seconds.Second Scenario: optimization enabled in development (current fork state)
Repository: https://github.com/gabrielcs23/angular-esbuilder-kendo-localization
Enabling optimization (somehow) caused the texts to be translated correctly. I have no idea why this setting makes a difference for loading translations and would like very much to understand so, as I don’t fully understand the underlying cause. However, the side effects were:
CLI log excerpt:
Note that the project builder is
@angular-devkit/build-angular:application. On the other hand, it is possible to get everything working as expected when optimization is disabled, but only if using the browser builder instead.My team and I would prefer to stick with Vite + esbuilder if possible. Any guidance on how to get i18n working with optimization enabled (or how to improve performance when optimization is on) would be greatly appreciated.
sroucheray commentedon Sep 3, 2026
Any update on this? I encountered the problem when trying to localize the ngx-bootstrap datepicker using
LOCALE_ID. It worked well previously but stopped working as soon as we switched to@angular-devkit/build-angular:browser-esbuild.