Skip to content

PluralForms

PluralForms = object

Defined in: packages/format-po/src/plural-forms.ts:6

How a language picks which msgstr[i] applies to a given count.

readonly count: number

Defined in: packages/format-po/src/plural-forms.ts:8

nplurals — how many plural forms the language distinguishes.


readonly select: (n) => number

Defined in: packages/format-po/src/plural-forms.ts:14

Which msgstr index applies to n, always within [0, count). An expression that answers outside that range is clamped, as gettext does, so a mistranslated header cannot index past the entry’s strings.

number

number