Cinder.Messages (Cinder v0.8.1)

View Source

Provides Gettext macros with configurable backend support.

This module allows using Gettext macros while supporting a configurable backend through the :gettext_backend application config.

Summary

Functions

Injects Gettext macros into the using module.

Gets the default Gettext backend or a user configured one.

Functions

__using__(opts)

(macro)

Injects Gettext macros into the using module.

This allows automatic extraction of translation strings while maintaining support for configurable Gettext backends.

Usage

defmodule MyModule do
  use Cinder.Messages

  def my_function do
    dgettext("cinder", "Hello world")
  end
end

gettext_backend()

Gets the default Gettext backend or a user configured one.

This is called at compile-time to determine which backend to use.