Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orisons/y18n
Internationalization library based on YAML files.
https://github.com/orisons/y18n
elixir i18n internationalization yaml
Last synced: 30 days ago
JSON representation
Internationalization library based on YAML files.
- Host: GitHub
- URL: https://github.com/orisons/y18n
- Owner: orisons
- License: apache-2.0
- Created: 2017-11-17T21:41:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-11T06:53:39.000Z (almost 7 years ago)
- Last Synced: 2024-12-16T05:39:45.456Z (2 months ago)
- Topics: elixir, i18n, internationalization, yaml
- Language: Elixir
- Size: 49.8 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Readme
**Internationalization library based on YAML files.**
## Installation
Add `y18n` as dependency in `mix.exs`
```elixir
[{:y18n, "~> 1.0"}]
```## Basic usage
Use translation functions `y/1` or `y/3`
```elixir
iex> y("Hello world") # Singular
"Witaj świecie"
iex> y("%d apple", "%d apples", 3) # Plural
"3 jabłka"
```
**To use with Plug or Phoenix framework go here**## Generate YAML file
```elixir
mix y18n.fetch
```
Translation files will be available in `priv/y18n/`. More info here