exi18n v0.1.0 ExI18n
ExI18n - key-based internationalization library.
Summary
Functions
Default locale set in configuration
Path to directory that contains all files with translations
Storage type used to store translations
Search for translation in given locale
based on provided key
Functions
Search for translation in given locale
based on provided key
.
Parameters
locale
:String
with name of locale.key
:String
with path to translation.values
:Map
with values that will be interpolated.
Examples
iex> ExI18n.t("en", "hello")
"Hello world"
iex> ExI18n.t("en", "hello_name", name: "Joe")
"Hello Joe"
iex> ExI18n.t("en", "invalid")
** (ArgumentError) Missing translation for key: invalid
iex> ExI18n.t("en", "incomplete.path")
** (ArgumentError) incomplete.path is incomplete path to translation.