MAIDR JavaScript API
    Preparing search index...

    Function ensureLocalePack

    • Loads a locale's pack if the page has not, so a reader who chose a language hears it without the page author having added a script tag.

      English needs no pack. A pack already registered, in flight, or present as a script tag is not fetched again. Resolves to whether the locale is loaded once the attempt settles; a page with no locatable pack directory resolves false with one warning, and MAIDR keeps speaking English.

      Parameters

      • locale: Locale

        The locale to make available

      Returns Promise<boolean>

      Whether the locale's dictionary is loaded