https://github.com/ysemeniuk/iso639-elixir
Elixir library for converting language code from one version of ISO 639 standard to another and back
https://github.com/ysemeniuk/iso639-elixir
elixir iso639 language
Last synced: 17 days ago
JSON representation
Elixir library for converting language code from one version of ISO 639 standard to another and back
- Host: GitHub
- URL: https://github.com/ysemeniuk/iso639-elixir
- Owner: ysemeniuk
- License: apache-2.0
- Created: 2018-07-11T08:25:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T14:05:50.000Z (almost 4 years ago)
- Last Synced: 2025-12-13T01:56:20.941Z (6 months ago)
- Topics: elixir, iso639, language
- Language: Elixir
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ISO 639
This library exposes functions to convert ISO 639-1 language code representation to ISO 639-2 and backwards where it's applicable.
Data for conversions was taken from [Benjamin Martin's repo](https://github.com/haliaeetus/iso-639).
Note about ISO 639-2/B: all Bibliographic codes will be converted to ISO 639-2 codes
## Installation
To use ISO639 in your Mix projects, first add ISO639 as a dependency, as well as the JSON library you want to use.
```elixir
def deps do
[
{:iso639_elixir, "~> 0.2.1", submodules: true},
{:jason, "~> 1.0"}
]
end
```
### JSON library
You can use a different JSON library for decoding of JSON file with dictionary of languages, just add library of your preference to your deps:
```elixir
def deps do
[
{:iso639_elixir, "~> 0.2.1", submodules: true},
{:poison, "~> 5.0"}
]
end
```
And configure which library to use in your config file. Default is [Jason](https://hex.pm/packages/jason)
```elixir
# config/config.exs
config :iso639_elixir, :json_library, Poison
```
### Download
After adding ISO639 as a dependency, run `mix deps.get` to install it.
## Docs
Documentation can be found at [hexdocs](https://hexdocs.pm/iso639_elixir).