Static ReadonlyCHOOSER_The chooser endpoint the chooser's form posts to.
Static ReadonlyROW_The collapsed row's CSS.
Static ReadonlySOURCEThe catalog every chain ends in.
StaticacceptReads an Accept-Language value — or a preferredLanguage, which has
the same syntax — into tags, best first. A q=0 tag and the wildcard
are left out; a tag that is not well-formed is skipped.
the header or attribute value
canonical tags, best first
StaticcanonicalCanonicalises a language tag, or answers '' for one that is not
well-formed (RFC 5646). tl becomes fil, iw becomes he, and case
is normalised.
the tag as given
the canonical tag, or ''
StaticcatalogTakes every catalog of a catalogs.json index apart, skipping one
Intl.Locale refuses (the server's loader logs that; a browser cannot).
the index's catalogs
their parts, in order
StaticchainReturns the catalogs that answer one tag, most specific first and English last: a regional overlay naming the tag's region, then the base catalog of its language and script.
a canonical tag
every catalog's parts, in catalogs.json's order
the chain, which ends in English; matched says whether
anything before English answered, or English itself did
StaticchooserDraws the language chooser: a form posting to the chooser endpoint, the
offered locales by their own names, and a submit button. A static
surface's runtime sends the same form as a request
(WebI18n.wireChooser()) and draws the page again; a server-drawn page
posts it.
the page's translator
the locales the chooser offers, each with its endonym
every catalog's parts, for which offered locale the page is read in
the path to come back to; held to a local one
the chooser as HTML
StaticescEscapes text for HTML, as Html.esc() does.
anything
the escaped text
StaticnegotiateNegotiates a list of preferences, best first, against the catalogs: the first one a catalog answers wins; when none does, the last resort does, and English when that answers nothing either.
tags, best first
the tag to use when no preference is answered (the locale policy's default)
every catalog's parts, in catalogs.json's order
the locale, its catalog chain and its direction
StaticpartsTakes a tag apart: language, script and region, the region it NAMES, and
its text direction. Throws on a tag Intl.Locale refuses.
a canonical tag
the parts
StaticpreferencesLists a page's language preferences, best first, in #539's order —
everything but the locale policy's default, which is the last resort a
caller hands negotiate().
what the page's language is chosen from
canonical tags, best first, each once
StaticrowWraps a chooser's form in the collapsed row.
the translated Language, as HTML
the offered locale the page is read in, or undefined
the chooser's form
the row's HTML
StaticsafeHolds a return path to a local path: one that starts with a single /,
names no scheme or host, and carries no control character or backslash.
Anything else is /.
the path the chooser posted
a safe local path
StaticuiReads an OpenID Connect ui_locales value: a space-separated list of
tags, best first.
the parameter
canonical tags, best first
Tags, the order of preferences, negotiation and the chooser. A static utility class; it holds no state.