PhoenixMultilingual.Hooks.StoreView (phoenix_multilingual v0.1.11)

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

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

Example

defmodule MyAppWeb.HomeLive do
  use MyAppWeb, :live_view

  alias PhoenixMultilingual.Hooks.StoreView

  on_mount {StoreView, default_locale: "en"}
end

Summary

Functions

on_mount(list, params, session, socket)