Cldr.Plug.AcceptLanguage (Cldr Plug v1.3.4)
View SourceParses the accept-language header if one is available and sets
conn.private[:cldr_locale] accordingly.  The locale can
be later retrieved by Cldr.Plug.AcceptLanguage.get_cldr_locale/1
Options
:cldr_backendis any backend module. The default isCldr.default_backend/0. If no:cldr_backendoption is provided and no default backend is configured then an exception will be raised.:no_match_log_leveldetermines the logging level for the case when no matching locale is configured to meet the users request. The default is:warning. If set tonilthen no logging is performed.
Example
# Using a specific backend to validate
# and match locales
plug Cldr.Plug.AcceptLanguage,
  cldr_backend: MyApp.Cldr
# Using the default backend to validate
# and match locales
plug Cldr.Plug.AcceptLanguage
    Summary
Functions
Returns the locale which is the best match for the provided accept-language header
Return the locale set by Cldr.Plug.AcceptLanguage
Functions
Returns the locale which is the best match for the provided accept-language header
Return the locale set by Cldr.Plug.AcceptLanguage