jeffersongoncalves/laravel-auto-translate
Automatically translate Laravel model attributes and content into multiple languages. Keeps localized fields in sync via translation services, cutting manual work for multilingual apps. Simple, Eloquent-friendly configuration makes setup quick and keeps your app ready for global users.
composer require <vendor>/<package>
php artisan vendor:publish --tag=<package>-config
config/<package>.php or the relevant environment variables. Set a contact email if the driver supports it — MyMemory grants a larger anonymous quota when a valid email is supplied.$translated = app(Translator::class)->translate('Hello world', 'en', 'fr');
Then move the same call into a queued job before translating anything in bulk.Cache::remember() keyed by source text hash, source locale, target locale, and driver. This reduces quota usage and makes repeated page renders cheap.translations table or generated lang/ files. Do not overwrite the source column; keep both so you can re-run translation after source edits.strlen() when checking payload size, not mb_strlen(). Accented characters, CJK text, and emoji consume multiple bytes and can push a short-looking sentence over the limit.php artisan config:clear. Stale cached config is a common cause of “why is it still using the old key?” debugging sessions.strlen($payload) alongside the source locale and target locale.How can I help you explore Laravel packages today?