Locale
Factory, parsing, composition, and negotiation for Locale.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Locale.type
Members list
Type members
Classlikes
Why a tag was refused, each case carrying the offending subtag.
Why a tag was refused, each case carrying the offending subtag.
Attributes
- Companion
- object
- Supertypes
-
class WorldErrorclass TypedErrortrait NoStackTraceclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Value members
Concrete methods
Resolves an Accept-Language header against a supported set by the RFC 4647 Lookup scheme: ranges are parsed, zero-quality entries dropped, and the rest tried in weight order. None when nothing matches. A caller that has already parsed the header feeds the Seq overload.
Resolves an Accept-Language header against a supported set by the RFC 4647 Lookup scheme: ranges are parsed, zero-quality entries dropped, and the rest tried in weight order. None when nothing matches. A caller that has already parsed the header feeds the Seq overload.
Attributes
The same Lookup over ranges the caller has already ordered by preference, for a server that parses the wire grammar itself. Order carries the weighting, and dropping zero-quality ranges is the caller's.
The same Lookup over ranges the caller has already ordered by preference, for a server that parses the wire grammar itself. Order carries the weighting, and dropping zero-quality ranges is the caller's.
Attributes
Parses and canonicalises a BCP 47 tag, private-use tags (x-...) included, so a genuinely unregistered context is nameable without pretending registration.
Parses and canonicalises a BCP 47 tag, private-use tags (x-...) included, so a genuinely unregistered context is nameable without pretending registration.
Extension and private-use subtags are preserved but not interpreted. The registry's grandfathered irregular tags are refused.
Attributes
Givens
Givens
Extensions
Extensions
The primary language, where the tag carries one. A private-use tag does not, and nothing is substituted for it.
The primary language, where the tag carries one. A private-use tag does not, and nothing is substituted for it.
Attributes
Adds the most likely script and region where absent, per UTS 35. Identity where the data holds no answer.
Adds the most likely script and region where absent, per UTS 35. Identity where the data holds no answer.
Attributes
The shortest tag that maximises to the same thing, per UTS 35. Identity for a tag with no language to shorten towards.
The shortest tag that maximises to the same thing, per UTS 35. Identity for a tag with no language to shorten towards.
Attributes
The canonical BCP 47 tag.
The canonical BCP 47 tag.