Makes the loader.
the browser's objects: fetch, document, navigator
the page, for its addresses
the catalog namespaces the surface draws
(['home', 'chooser'])
One attribute of the shell's <html>.
the attribute
its value, or ''
The browser's languages as an Accept-Language value.
the tags, comma-separated, best first
Sends a choice to the chooser endpoint, as its form would have posted it, and keeps it for this page load.
the tag chosen
the return path the form carried
whether the endpoint took it
Draws the language chooser for a page drawn with t.
the page's translator
the page's own path and query, the realm's prefix included
the chooser's markup, or '' before the index is loaded
The catalog index, once.
the index, { source, catalogs, offered }
Fetches one JSON file, or null where it cannot be had.
the path under the realm
the JSON, or null
Adds a namespace the page draws, for the next load() — a control a
page draws only when the service says so (#561's account control),
whose words are fetched only then.
the namespace
whether it was not loaded before
Loads the page's translator: negotiates, fetches the namespaces' catalogs along the chain, and marks the document's language and direction. It is also the default a helper handed no translator draws with.
Optionalinput: LoadInputs
ui_locales and the person's own language, where known
the translator
Negotiates the page's language in today's order.
Optionalinput: LoadInputs
ui_locales and the person's own language, where known
the negotiation
Answers a submit of the chooser drawn on the page: the choice is sent
and then draws the page again. Any other form is left alone.
the submit event
what to do once the choice is taken
whether the event was the chooser's
The query every catalog address carries: the build, so a new build's catalogs are new addresses and an old one's can be kept for good.
?v=<build>, or '' where the shell names none
Loads the catalogs a surface draws with, negotiates the page's language, and runs the language chooser.