feat: gettext
This commit is contained in:
parent
2ab3332941
commit
ca4ac3a1c0
15 changed files with 998 additions and 51 deletions
9
lib/mv_web/live_helpers.ex
Normal file
9
lib/mv_web/live_helpers.ex
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
defmodule MvWeb.LiveHelpers do
|
||||
import Phoenix.LiveView
|
||||
|
||||
def on_mount(:default, _params, session, socket) do
|
||||
locale = session["locale"] || "en"
|
||||
Gettext.put_locale(locale)
|
||||
{:cont, socket}
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue