1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Gettext do
7 A module providing Internationalization with a gettext-based API.
9 By using [Gettext](https://hexdocs.pm/gettext),
10 your module gains a set of macros for translations, for example:
12 import Pleroma.Web.Gettext
15 gettext "Here is the string to translate"
18 ngettext "Here is the string to translate",
19 "Here are the strings to translate",
22 # Domain-based translation
23 dgettext "errors", "Here is the error message to translate"
25 See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
27 use Gettext, otp_app: :pleroma