Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Pluralization

Index

Classes

Functions

Functions

Const defaultPluralizer

  • defaultPluralizer(i18n: I18n, count: number): string[]
  • The default pluralizer.

    It's pretty straightforward:

    • when count is 0, then the possible keys are either zero for other; this allows having translations like "You have no messages", defaulting to "You have 0 messages".
    • when count is 1, then the key is one.
    • when greater than 1, then the key is other.

    Parameters

    • i18n: I18n
    • count: number

      The number that's being analyzed.

    Returns string[]

    The list of possible translation scopes.

Generated using TypeDoc