How to interpolate HEEx components within gettext output?

You can try:

<%= gettext("Good morning! %{greeting}",
  greeting: greet(%{name: "Daniel"}) |> Phoenix.HTML.Safe.to_iodata() |> to_string()
)
|> raw() %>

Reference: Rendering live component to HTML - #2 by c4710n

1 Like