Fakererer.Gettext.Backend (Fakerer v0.1.0)

Copy Markdown View Source

Gettext backend for Fakererer.

This module provides internationalization support using Gettext. Locale data is stored in priv/gettext/<locale>/LC_MESSAGES/*.po

Usage

Gettext.put_locale(Fakererer.Gettext.Backend, "vi")
Gettext.gettext(Fakererer.Gettext.Backend, "Hello world")

Configuration

The default locale can be set in config:

config :fakererer, Fakererer.Gettext.Backend, default_locale: "en"

Or per-process:

Gettext.put_locale(Fakererer.Gettext.Backend, "vi")

Summary

Functions

handle_missing_bindings(exception, incomplete)

Callback implementation for Gettext.Backend.handle_missing_bindings/2.

handle_missing_plural_translation(locale, domain, msgctxt, msgid, msgid_plural, n, bindings)

Callback implementation for Gettext.Backend.handle_missing_plural_translation/7.

handle_missing_translation(locale, domain, msgctxt, msgid, bindings)

Callback implementation for Gettext.Backend.handle_missing_translation/5.