Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Translator

Index

Constructors

constructor

Properties

Protected formatter

formatter: RichMessageFormatter = ...

The underlying ICU MessageFormatter util.

translations

translations: Translations = {}

A map of translation keys to their translated values.

Methods

addTranslations

Protected formatterTypeHandlers

  • formatterTypeHandlers(): { plural: (value: string, matches: string, locale: string, values: Record<string, any>, format: (text: string, values: Record<string, any>) => string) => string; select: (value: string, matches: string, locale: string, values: Record<string, any>, format: (text: string, values: Record<string, any>) => string) => string }
  • An extensible entrypoint for extenders to register type handlers for translations.

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

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

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

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

                Returns string

          Returns string

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

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

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

                Returns string

          Returns string

Protected preprocessParameters

setLocale

  • setLocale(locale: string): void

trans

Generated using TypeDoc version 0.22.10