MCPcopy Index your code
hub / github.com/angular/angular / getPluralCase

Function getPluralCase

packages/core/src/i18n/localization.ts:16–20  ·  view source on GitHub ↗
(value: string, locale: string)

Source from the content-addressed store, hash-verified

14 * Returns the plural case based on the locale
15 */
16export function getPluralCase(value: string, locale: string): string {
17 const plural = getLocalePluralCase(locale)(parseInt(value, 10));
18 const result = pluralMapping[plural];
19 return result !== undefined ? result : 'other';
20}
21
22/**
23 * The locale id that the application is using by default (for translations and ICU expressions).

Callers 1

getCaseIndexFunction · 0.90

Calls 1

getLocalePluralCaseFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…