Expand description
Parser for an Accept-Language HTTP header.
Structs§
- Accept
Language - Stores a parsed version of an HTTP Accept-Language header.
- Item 🔒
- Language
Tags - A list of BCP47 language tags.
- Weight 🔒
Enums§
- Accept
Language 🔒Error - Errors when parsing an
AcceptLanguage. - Language
- Used to set the language for rendering.
- User
Language Languagebut with the environment’s locale converted to something we can use.
Constants§
- OWS 🔒
- Optional whitespace, Space or Tab, per RFC 7230.
Functions§
- get_
language_ 🔒tags_ from_ environment - Gets language tags from the environment.
- locale_
from_ 🔒environment - Gets the user’s preferred locale from the environment and
translates it to a
LocalewithLanguageRangefallbacks.