PhoenixKitCatalogue.AITranslateBinding (PhoenixKitCatalogue v0.8.0)

Copy Markdown View Source

PhoenixKitAI.Components.AITranslate.FormBinding for catalogue forms — the storage-specific half of the shared AI-translate glue.

Catalogue stores translations in the multilang data JSONB via PhoenixKit.Utils.Multilang, with per-language overrides under underscore-prefixed keys (data[lang]["_name"]). The engine speaks plain field names, so apply_translation/4 re-prefixes before writing and force-stores even values equal to the primary (so an untranslatable string still fills the field instead of looking like a failed translation).