legendary-doc-site/apps/core/lib/i18n.ex
2020-07-10 19:39:38 +00:00

18 lines
428 B
Elixir

defmodule I18n do
@moduledoc """
The internationalization and strings module. Keeps strings outside the codebase and allows them to
be replaced on a per locale basis by editing yml files.
"""
use Linguist.Vocabulary
Path.join(["../../config/i18n", "*.yml"])
|> Path.wildcard()
|> Enum.each(fn path ->
locale =
path
|> Path.basename()
|> Path.rootname()
locale locale, path
end)
end