exmr/lib/exmr_web/helpers.ex

8 lines
187 B
Elixir
Raw Permalink Normal View History

defmodule ExmrWeb.LiveHelpers do
def on_mount(:default, _params, session, socket) do
locale = session["locale"] || "en"
Gettext.put_locale(locale)
{:cont, socket}
end
end