Laravel AI Translations is in active development
Coming Soon
You can explore the page below to see what's coming. Want a heads-up when it ships? Drop your email and we'll email you the moment v0.1.0 lands on Packagist.
AI Translations
AI-powered translation management for Laravel language files. Pluggable drivers (OpenAI, Google, custom), queueable jobs, and a one-line Filament action for any Languages resource.
OpenAI (with optional throttling for rate-limited tiers) and Google Translate built in.
Register your own driver (DeepL, Azure, in-house) via AiTranslationManager::extend().
Reads lang/{source}/app.php and writes lang/{target}/app.php — preserving keys and nesting.
Configurable chunk size and throttle delays keep you within OpenAI rate limits on slow tiers.
TranslateLanguageJob runs translation as a background job with a configurable queue and timeout.
AiTranslateAction is a one-line, reusable Filament Action with a driver picker.
Available Drivers
Uses gpt-4o-mini by default; high-quality, context-aware translations including placeholder preservation.
AI_TRANSLATION_DRIVER=openai
Same OpenAI driver with built-in sleep between chunks for rate-limited tiers (free / low-RPM).
AI_TRANSLATION_DRIVER=openai_throttled
Free Google Translate endpoint with a configurable per-request delay. No API key required.
AI_TRANSLATION_DRIVER=google
Quick Start
Install
composer require codenzia/laravel-ai-translations
Configure
Publish the config and set your driver + API key.
Translate
Use the manager, the facade, or dispatch the job.
Integrate
Drop AiTranslateAction into a Filament Languages resource.
1. Configuration (.env)
Pick a driver and source locale. Queue settings are optional — leave them unset to run translations synchronously.
2. Translate via the Manager
The manager is the lowest-friction entry point — pass target locale, source locale, and the human-readable language name.
3. Or via the Facade
The AiTranslation facade lets you switch drivers
inline and translate raw arrays without touching the lang folder.
4. Queue Long-Running Translations
Big language files chew through tokens — dispatch the job and let it run in the background.
5. Filament Action
Drop AiTranslateAction into any
Languages resource. The action shows a driver picker, dispatches the job, and notifies the user.
Custom Drivers
Need DeepL, Azure, or an in-house model? Implement the driver contract and register it in a service provider.