Skip to content

novistore/cldr_languages

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cldr Languages

Build Status Hex.pm Hex.pm Hex.pm

ex_cldr_languages is an addon library application for ex_cldr that provides localization and listing of languages.

The primary api is MyApp.Backend.Language.to_string/2. The following examples demonstrate:

iex> MyApp.Backend.Language.to_string "en-GB"
{:ok, "British English"}

iex> MyApp.Backend.Language.to_string "en-GB", style: :short
{:ok, "UK English"}

iex> MyApp.Backend.Language.to_string "en", locale: "de"
{:ok, "Englisch"}

Installation

def deps do
  [
    {:ex_cldr_languages, "~> 0.2.0"}
  ]
end

Migration from v0.1.1 to v0.2.0

With the switch to ex_cldr v2 any functionality is now to be called via MyApp.Backend.Language instead of Cldr.Language. This breaking change was also used to remove all_languages/0 in favor of available_languages/0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%