Skip to content

Problem with 'few' value using NgPlural #36935

@juanjinario

Description

@juanjinario

🐞 bug report

Affected Package

The issue is caused by package @angular/../i18n/localization

Description

I am using the directive [ngPlural] my code is as follows

<label [ngPlural]="viewFlight.nights">
   <ng-template ngPluralCase="=1" i18n="@@predictor_itinerary_night">noche</ng-template>
   <ng-template ngPluralCase="few" i18n="@@predictor_itinerary_nights">noches</ng-template>
</label>

According to the documentation (https://angular.io/api/common/NgPlural) The code should work

Also in angular.json> build> options> I have set the default language of the application as:
"i18nLocale": "es"
I don't know if this is important since I can't think of anything else.,

🔥 Exception or Error

Error: No plural message found for value "3"
// The error appears with any value greater than 1



🌍 Your Environment

Angular Version:

9.0.5



Anything else relevant?

Metadata

Metadata

Labels

area: commonIssues related to APIs in the @angular/common packagearea: i18nIssues related to localization and internationalizationfreq1: lowtype: bug/fix

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions