Initial commit: there's still tons of base Phoenix boilerplate to remove, but the...
[tech-radar-editor.git] / web / gettext.ex
1 defmodule TechRadarEditor.Gettext do
2 @moduledoc """
3 A module providing Internationalization with a gettext-based API.
4
5 By using [Gettext](https://hexdocs.pm/gettext),
6 your module gains a set of macros for translations, for example:
7
8 import TechRadarEditor.Gettext
9
10 # Simple translation
11 gettext "Here is the string to translate"
12
13 # Plural translation
14 ngettext "Here is the string to translate",
15 "Here are the strings to translate",
16 3
17
18 # Domain-based translation
19 dgettext "errors", "Here is the error message to translate"
20
21 See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
22 """
23 use Gettext, otp_app: :tech_radar_editor
24 end