docs: added comment
This commit is contained in:
parent
f0b0de0008
commit
7e2aa49674
1 changed files with 2 additions and 1 deletions
|
|
@ -37,7 +37,8 @@ defmodule MvWeb.LiveUserAuth do
|
||||||
end
|
end
|
||||||
|
|
||||||
def on_mount(:live_no_user, _params, session, socket) do
|
def on_mount(:live_no_user, _params, session, socket) do
|
||||||
# Set the locale for not logged in user to set the language
|
# Set the locale for not logged in user to set the language in the Log-In Screen
|
||||||
|
# otherwise the locale is not taken for the Log-In Screen
|
||||||
locale = session["locale"] || "en"
|
locale = session["locale"] || "en"
|
||||||
Gettext.put_locale(MvWeb.Gettext, locale)
|
Gettext.put_locale(MvWeb.Gettext, locale)
|
||||||
{:cont, assign(socket, :locale, locale)}
|
{:cont, assign(socket, :locale, locale)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue