Multilingual.Hooks.PutGettextLocale (multilingual v0.1.8)
Sets the Gettext locale in the LiveView socket based on the locale stored in the socket's private data.
This hook must follow the StoreView hook in the LiveView's
on_mount
hook list.
Example
defmodule MyAppWeb.HomeLive do
use MyAppWeb, :live_view
alias Multilingual.Hooks.StoreView
alias Multilingual.Hooks.PutGettextLocale
on_mount {StoreView, default_locale: "en"}
on_mount PutGettextLocale
end
Summary
Functions
Link to this function