Skip to content

cozy-elixir/plug_locale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlugLocale

CI Hex.pm

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>}
  ]
end

Usage

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 gettext or ex_cldr.

Check out PlugLocale.Browser, PlugLocale.Header in documentation for more details.

Thanks

This library is built on the wisdom in following code:

License

Apache License 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Languages