Hierarchy

  • Translator

Constructors

Properties

formatter: RichMessageFormatter = ...

The underlying ICU MessageFormatter util.

translations: Translations = {}

A map of translation keys to their translated values.

Methods

  • An extensible entrypoint for extenders to register type handlers for translations.

    Returns {
        plural: ((value, matches, locale, values, format) => string);
        select: ((value, matches, locale, values, format) => string);
    }

    • plural: ((value, matches, locale, values, format) => string)
        • (value, matches, locale, values, format): string
        • Parameters

          • value: string
          • matches: string
          • locale: string
          • values: Record<string, any>
          • format: ((text, values) => string)
              • (text, values): string
              • Parameters

                • text: string
                • values: Record<string, any>

                Returns string

          Returns string

    • select: ((value, matches, locale, values, format) => string)
        • (value, matches, locale, values, format): string
        • Parameters

          • value: string
          • matches: string
          • locale: string
          • values: Record<string, any>
          • format: ((text, values) => string)
              • (text, values): string
              • Parameters

                • text: string
                • values: Record<string, any>

                Returns string

          Returns string

Generated using TypeDoc v0.24.8