From 4ea9aed4ddbd186fb631bb23a9ab5ed86ca12586 Mon Sep 17 00:00:00 2001 From: Kam Date: Sun, 7 Jun 2026 00:22:08 +0300 Subject: [PATCH] docs: fix CurrencyPipe locale override example The "Override current locale for CurrencyPipe" example used `{{ amount | currency: 'en-US' }}`, but the first `CurrencyPipe` argument is the currency code, not the locale, so `'en-US'` was treated as an invalid currency code (rendered literally as the symbol) and the locale was never overridden. Since `locale` is the fourth positional argument, the example now passes a valid currency code, display, and digits before it (`'USD' : 'symbol' : '1.2-2' : 'en-US'`), matching the parameter order shown on the CurrencyPipe API page. --- adev/src/content/guide/i18n/format-data-locale.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adev/src/content/guide/i18n/format-data-locale.md b/adev/src/content/guide/i18n/format-data-locale.md index 3565cf2efc6c..122f32b6fee4 100644 --- a/adev/src/content/guide/i18n/format-data-locale.md +++ b/adev/src/content/guide/i18n/format-data-locale.md @@ -25,7 +25,7 @@ Add the `locale` parameter to the pipe to override the current value of `LOCALE_ To force the currency to use American English \(`en-US`\), use the following format for the `CurrencyPipe` ```angular-html -{{ amount | currency: 'en-US' }} +{{ amount | currency: 'USD' : 'symbol' : '1.2-2' : 'en-US' }} ``` HELPFUL: The locale specified for the `CurrencyPipe` overrides the global `LOCALE_ID` token of your application.