View Source PlugLocale
Plugs for putting locale into assigns storage.
Installation
Add :plug_locale to the list of dependencies in mix.exs:
def deps do
[
{:plug_locale, <requirement>}
]
endUsage
Different from set_locale, ex_cldr_plugs, etc, plug_locale:
- only does one simple thing - setting a locale-related assign (by default, it is
conn.assigns.locale). - does not make any assumptions about the localization strategy, so it is not tightly bound to packages like
gettextorex_cldr.
Check out PlugLocale.WebBrowser, PlugLocale.Header in documentation for more details.
Thanks
This library is built on the wisdom in following code:
License
Apache License 2.0