fluent.js
    Preparing search index...

    Class ReactLocalization

    ReactLocalization handles translation formatting and fallback.

    The current negotiated fallback chain of languages is stored in the ReactLocalization instance in form of an iterable of FluentBundle instances. This iterable is used to find the best existing translation for a given identifier.

    The ReactLocalization class instances are exposed to Localized elements via the LocalizationProvider component.

    Index

    Constructors

    Properties

    bundles: Iterable<FluentBundle>
    parseMarkup: null | MarkupParser
    reportError: (error: Error) => void

    Methods

    • Parameters

      • sourceElement: ReactElement
      • id: string
      • args: {
            attrs?: Record<string, boolean>;
            elems?: Record<
                string,
                ReactElement<any, string | JSXElementConstructor<any>>,
            >;
            vars?: Record<string, FluentVariable>;
        } = {}

      Returns ReactElement

    • Parameters

      • id: string
      • Optionalvars: null | Record<string, FluentVariable>
      • Optionalfallback: string

      Returns string