Multilang data JSONB helpers — read merged language data from a
record and write language-specific overrides through the entity's own
update function.
Public surface is re-exported from PhoenixKitCatalogue.Catalogue.
Summary
Functions
Gets translated field data for a record in a specific language. Returns merged data (primary language as base + overrides for the requested language).
Updates the multilang data field for a record with language-specific
field data. For primary language: stores ALL fields. For secondary
languages: stores only overrides (differences from primary).
Functions
Gets translated field data for a record in a specific language. Returns merged data (primary language as base + overrides for the requested language).
@spec set_translation(map(), String.t(), map(), function(), keyword()) :: {:ok, term()} | {:error, term()}
Updates the multilang data field for a record with language-specific
field data. For primary language: stores ALL fields. For secondary
languages: stores only overrides (differences from primary).
update_fn is the entity's update function. It receives (record, attrs)
for 2-arity or (record, attrs, opts) for 3-arity when activity-logging
opts are provided.