Skip to content

LOCALE_ID wrong #59405

Closed
Closed

Description

@gobeli

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

Yes

Description

After the update to Angular 19, we always get "en-US" as the chosen locale (injection token LOCALE_ID).
Can someone explain why this might be? We have 4 locales and all translations are displaying correctly, but the LOCALE_ID is always "en-US".

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 18.2.1
Node: 20.17.0
Package Manager: npm 10.8.2
OS: darwin arm64

Angular: 19.0.5
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.1
@angular-devkit/build-angular   19.0.6
@angular-devkit/core            18.2.1
@angular-devkit/schematics      18.2.1
@angular/cdk                    19.0.4
@angular/cli                    18.2.1
@angular/material               19.0.4
@angular/ssr                    19.0.6
@schematics/angular             18.2.1
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.15.0

Anything else?

No response

Activity

  1. added
    needs reproduction
    on Jan 7, 2025
  2. JeanMeche commented on Jan 7, 2025

    @JeanMeche
    Member

    Hi, could you provide a reproduction of this issue so we can have a look at it ? Thank you.

  3. wartab commented on Jan 7, 2025

    @wartab
    Contributor

    We also had this issue.
    I am not 100% certain if that ended up being the fix, but from memory, we had an import of $localize somewhere in the code, because WebStorm somehow added the import import {$localize} from "@angular/localize/init"; in one of our files. That needs to be removed.

  4. added
    area: i18n
    on Jan 7, 2025
  5. added this to the Backlog milestone on Jan 7, 2025
  6. gobeli commented on Jan 8, 2025

    @gobeli
    Author

    That was it @wartab thank you!

  7. angular-automatic-lock-bot commented on Feb 8, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nneeds reproduction

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions