Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Catalog

A Catalog is a container for a set of translations loaded from a .json or a binary .mo file.

This interface is used internally. You will only need it if you want to write your own message retrieval method or want to inspect a loaded Catalog.

Hierarchy

  • Catalog

Index

Properties

Methods

Properties

entries

The actual translations.

major

major: number

The major revision number of the catalog, currently always 0.

minor

minor: number

The minor revision number of the catalog, currently always 0 or 1.

Methods

pluralFunction

  • pluralFunction(numItems: number): number
  • Compute the index of a plural form from a number of items. If a language has one singular and two plural forms, the singular form would have index 0 and the plural forms have index 1 and 2.

    The plural function would then compute one of 0, 1, or 2 from an arbitrary non-negative integer.

    Parameters

    • numItems: number

      the number of items.

    Returns number

    the index of the plural form.

Generated using TypeDoc