Internationalization library based on YAML files.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
docs
guides
lib
priv/y18n
test
.formatter.exs
.gitignore
.travis.yml
ISSUE_TEMPLATE.md
LICENSE.md
README.md
mix.exs
mix.lock

README.md

Readme

Internationalization library based on YAML files.

Installation

Add y18n as dependency in mix.exs

[{:y18n, "~> 1.0"}]

Basic usage

Use translation functions y/1 or y/3

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

mix y18n.fetch

Translation files will be available in priv/y18n/. More info here