Skip to content

AI 0.17.0: A ready-made language tabs component with AI translation

AI 0.17.0 adds one component for module developers: <.ai_multilang_tabs>, the multilingual form tabs with AI translation already in place.

Language tabs with AI translation

Catalogue, Projects and Publishing each built the same layout by hand: core’s language tabs, with the AI translate button, its progress and its hint underneath. The new component wraps core’s multilang_tabs/1 and puts that row in its usual place. It takes the same attributes as core’s tabs, plus an ai_translate config map from FormGlue.ai_translate_config/1.

When the config is nil or AI translation is off, the component renders exactly what core’s tabs alone would. So a form can pass it in every case and let the setting decide whether the button appears.

The confirmation modal is not part of the component, because a form cannot sit inside another form. Keep <.ai_translate_modal> outside the page’s outer form, as before.

What it means for a site

Nothing changes on its own. The forms of other modules show the AI translate row this way once those modules adopt the component.

Upgrading

No migration. Update the dependency; existing forms keep working unchanged.

Full release notes: AI 0.17.0

0.17.0 · 22 July 2026

Added

  • <.ai_multilang_tabs> component. Wraps core’s PhoenixKitWeb.Components.MultilangForm.multilang_tabs/1 with the AI-translate button/progress/hint row bundled underneath in the canonical placement — the “just enable it” entry point for the layout every consumer (catalogue, projects, publishing) was previously hand-building. Attrs mirror multilang_tabs/1 plus an ai_translate config map from FormGlue.ai_translate_config/1; when that’s nil or disabled, renders byte-identical to core’s tabs alone, so the attr is safe to pass unconditionally. The modal is not bundled (HTML forbids nested <form>s) — keep <.ai_translate_modal> outside the host’s outer form as before. See PR #14.

AI 0.17.0. Install or update: {:phoenix_kit_ai, "~> 0.17"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.