Multilingual.LiveView.Hook (multilingual v0.1.1)

Store the view information in the LiveView socket's private data.

This hook must registered in for each LiveView in order to enable all other Multilingual features in Phoenix live views.

Example

defmodule MyAppWeb.HomeLive do

use MyAppWeb, :live_view

@impl true
def mount(params, session, socket) do
  ...
end

on_mount {Multilingual.LiveView.Hook, default_locale: "en"}

end

Summary

Functions

Link to this function

on_mount(list, params, session, socket)