Initial commit

This commit is contained in:
2023-02-16 23:40:19 +00:00
commit b0a7da3ddc
27 changed files with 1133 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
defmodule PhoenixApiTemplateWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import PhoenixApiTemplateWeb.Gettext
# Simple translation
gettext("Here is the string to translate")
# Plural translation
ngettext("Here is the string to translate",
"Here are the strings to translate",
3)
# Domain-based translation
dgettext("errors", "Here is the error message to translate")
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :phoenix_api_template
end