Disclaimer: I am not good at frontend design…
Let’s say I have a list of atoms used in an ecto schema:
@groups ~w(group_a group_b group_c)a
field :groupname, Ecto.Enum, values: @groups
Since I need something like this:
options={[
{gettext("Group A"), group_a},
{gettext("Group B"), group_b},
{gettext("Group C"), group_c}
]}
I am thinking of building the options dynamically and call
Gettext.dgettext(BackendWeb.Gettext, "options", msg)
on each
I can’t make up my mind how to handle this
Are there easier(more elegant) solution I might have missed?
How are you handling these kind of translations?