Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
869B

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