The gettext library allows you to have multiple “backends” (as they keep mentioning in the docs) and provides functions that apply only for specific backends.
I notice that
gettext/3 only works with a given backend though.
What is meant here by a backend? In which cases would you have multiple “backends” configured differently?
Backend means the implementation of gettext. You’ll know once read this https://en.m.wikipedia.org/wiki/Gettext
The module that implements the backend behaviour, usually by using the
defmodule MyApp.Gettext do
use Gettext, otp_app: :my_app
In which cases would you have multiple “backends” configured differently?
Perhaps when different apps / parts of the app need different translations, similar to when you’d use multiple ecto repos.