Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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