Skip to content

i18n pipes not using the LOCALE_ID by default #21660

@elias-garcia

Description

@elias-garcia

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When setting the LOCALE_ID token to a locale different than the default, the value gets changed, but when using a i18n pipe like the CurrencyPipe it's not reading the new LOCALE_ID value as expected. The new locale data is registered as the documentation says and also the LOCALE_ID token is provided as the documentation says.

Expected behavior

Any of the i18n pipes should use the LOCALE_ID value as the default locale.

Minimal reproduction of the problem with instructions

I have created a minimal StackBlitz reproducing the issue here.

What is the motivation / use case for changing the behavior?

The i18n pipes should use the LOCALE_ID by default as the documentation says.

Environment


Angular version: 5.2.1

Browser:
- [x] Chrome (desktop) version 63.0.3239.132

For Tooling issues:
- Node version: 8.8.0 
- Platform:  macOS High Sierra 10.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions