infofactory/statamic-ai-translations
AI translation addon for Statamic that helps translate entries and content across multisite locales. Streamline multilingual publishing with an in-control-panel workflow powered by your configured AI provider, simplifying localization without leaving the CMS.
This is a Statamic addon (not a standalone Laravel package), so treat it as CMS-adjacent tooling: it hooks into the control panel and the multi-site translation workflow rather than exposing a big public API surface.
composer require infofactory/statamic-ai-translationsphp artisan vendor:publish --tag=statamic-ai-translations-config (check vendor:publish output for the exact tag — Statamic addons vary).env and map them in the configphp artisan config:clear && php artisan cache:clear (Statamic caches addon manifests aggressively)Look first at: the published config file (provider, model, source/target site mapping, field whitelist). That file is the contract for everything else — most "it doesn't work" reports trace back to a missing provider key or an unmapped locale.
First use case: translate a single entry from your default site into one secondary site, in the foreground, before you touch queues. Confirm the output quality and field handling on one record before batching anything.
Manual CP translation (the default path). Editors trigger translation per-entry or per-field from the publish form. This is the lowest-risk adoption pattern and needs no infrastructure beyond a working API key.
Background translation (new in 5.1.0). The headline change in this release is an option to push translation work onto the queue instead of blocking the CP request. Enable it in the config and run a worker:
php artisan queue:work --queue=default
This matters most when you have long content, many fields, or slow providers — the synchronous path has a real chance of hitting PHP max_execution_time or a gateway timeout. For anything beyond a single short entry, prefer the background option and make sure your queue is supervised in production (Horizon or a systemd/Supervisor worker).
Programmatic/bulk translation. For migrations or content backfills, drive the translation from a console command or job rather than the CP, iterating entries and dispatching the package's translation job per entry. Chunk by collection and ID range so a failure is retryable instead of all-or-nothing.
Site/locale mapping. Keep source→target site pairs explicit in config rather than relying on inference. If your site handles are en, de, fr, an inferred mapping is fine; if they're default, german, french_ca, be explicit.
Field scoping. Restrict translation to the fields that actually need it (long-form text, Bard/Replicator prose). Do not blanket-translate handles, slugs, asset fields, or structured data you want humans to own — machine-translated slugs are a durable SEO problem.
Integration with editorial workflow. The natural fit is: editor publishes source entry → translation job runs → target entry lands as a draft → translator/editor reviews and publishes. Wire that into Statamic's events (EntrySaved, EntryPublished) with a guard flag so the translation write doesn't re-trigger the listener into a loop.
QUEUE_CONNECTION=sync in production (very common on small hosts), "background" silently degrades to blocking. Verify with php artisan queue:monitor or by inspecting the connection.storage/logs/laravel.log and enable debug logging for the addon's namespace before assuming the config is wrong.php artisan config:cache is required; Statamic's own caches add a second layer. When in doubt, clear both.How can I help you explore Laravel packages today?