{"id":28430976,"url":"https://github.com/elixir-cldr/cldr_currencies","last_synced_at":"2025-07-04T17:31:07.380Z","repository":{"id":33272492,"uuid":"135154113","full_name":"elixir-cldr/cldr_currencies","owner":"elixir-cldr","description":"Packages the currency definitions from CLDR into a set of functions to return currency data.","archived":false,"fork":false,"pushed_at":"2025-05-20T05:16:48.000Z","size":411,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T14:39:41.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-cldr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-28T11:51:12.000Z","updated_at":"2025-05-20T05:15:13.000Z","dependencies_parsed_at":"2024-04-20T22:21:12.791Z","dependency_job_id":"8217cb78-46a4-4bf0-a320-1ae1a5815d59","html_url":"https://github.com/elixir-cldr/cldr_currencies","commit_stats":null,"previous_names":["kipcole9/cldr_currencies"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-cldr/cldr_currencies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_currencies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_currencies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_currencies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_currencies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-cldr","download_url":"https://codeload.github.com/elixir-cldr/cldr_currencies/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-cldr%2Fcldr_currencies/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263587953,"owners_count":23484836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T14:30:42.230Z","updated_at":"2025-07-04T17:31:07.374Z","avatar_url":"https://github.com/elixir-cldr.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cldr Currencies\n\nPackages the currency definitions from [CLDR](http://cldr.unicode.org) into a set of functions\nto return currency data.\n\n## Installation\n\nThe package can be installed by adding `ex_cldr_currencies` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_cldr_currencies, \"~\u003e 2.13\"}\n  ]\nend\n```\n\n## Defining private use currencies\n\n[ISO4217](https://en.wikipedia.org/wiki/ISO_4217) permits the creation of private use currencies. These are denoted by currencies that start with \"X\" followed by two characters.  New currencies can be created with `Cldr.Currency.new/2` however in order to do so a supervisor must be started which maintains an `:ets` table that holds the custom currencies.\n\nSince the currencies are stored in an `:ets` table they are transient and will be lost on application restart. It is the developers responsibility to define the required private use currencies on application restart.\n\n### Starting the private use currency supervisor\n\nThe simplest way to start the private use currency supervisor is:\n```elixir\niex\u003e Cldr.Currency.start_link()\n```\n\nThe preferred method however is to add the supervisor to your applications supervision tree. In your application module (ie the one that includes `use Application`):\n```elixir\ndefmodule MyApp do\n  use Application\n\n  def start(_type, _args) do\n    # Start the service which maintains the\n    # :ets table that holds the private use currencies\n    children = [\n      Cldr.Currency\n      ...\n    ]\n\n    opts = [strategy: :one_for_one, name: MoneyTest.Supervisor]\n    Supervisor.start_link(children, opts)\n    \n    # Load your custom currencies now that the\n    # Cldr.Currency genserver is running\n    # load_my_custom_currencies()\n  end\nend\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-cldr%2Fcldr_currencies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-cldr%2Fcldr_currencies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-cldr%2Fcldr_currencies/lists"}