Routex.Extension.Localize.Phoenix.Extractor (Routex v1.3.1)
View SourceExtracts locale information from various sources. Handles both Plug.Conn
structs and map inputs.
Supports languages and regions defined in the IANA Language Subtag Registry
Sources
List of sources to examine for this field.
:accept_languageexamines theaccept-languageheader.:bodyusesbody_params; useful when using values in API bodies.:cookieuses the request cookie(s):hostexamines the hostname e.gen.example.comandexample.nl. Returns the first match..:pathusespath_paramssuch as/:locale/products/:queryusesquery_paramssuch as/products?locale=en-US:routeuses the (precompiled) route attributes.:sessionuses the session:assignsuses the assigns stored in connection of socket
Params
List of keys in a source to examine. Defaults to the name of the field with
fallback to locale.