i18n pipes not using the LOCALE_ID by default
See original GitHub issueI’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
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Why angular date pipe do not support locale language default ...
I am able to dynamically load locale data. My problem is with date formatting. i want to use date pipe to get locale...
Read more >Set the runtime locale manually - Angular
The Angular CLI automatically includes the locale data and sets the LOCALE_ID value when you use the --localize option with ng build command....
Read more >Internationalization (i18n) - Angular - w3resource
i18n pipes By default, Angular only contains locale data for en-US. If you set the value of LOCALE_ID to another locale, you must...
Read more >Localizing your app - Angular Hispano
If @angular/localize is not installed, the Angular CLI may generate an error when you ... Use a more specific locale ID, such as...
Read more >Internationalization (i18n) - Angular
Angular pipes can help you with internationalization: the DatePipe ... By default, the imported locale data is registered with the locale id that...
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 Free
Top 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
@luckylooke You only used locale
es
.yes, you have to load the locales, as explained here: https://angular.io/guide/i18n#i18n-pipes