Download the PHP package iperamuna/laravel-auto-translations without Composer
On this page you can find all versions of the php package iperamuna/laravel-auto-translations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download iperamuna/laravel-auto-translations
More information about iperamuna/laravel-auto-translations
Files in iperamuna/laravel-auto-translations
Package laravel-auto-translations
Short Description Auto-generate JSON language files, AI translations, and a local-only language browser.
License MIT
Informations about the package laravel-auto-translations
Laravel Auto Translations
✨ Automatically scan your Laravel app for translation keys, export them to JSON, generate translations via OpenAI, and preview them in a simple local browser UI.
🚀 Features
- 🔍 Scan your entire Laravel app for
__('...')usage - 🧠 Generate translated JSON files via OpenAI (e.g.,
en.json→es.json) - 🌐 Local-only language preview UI (
/langs) - 🔄 Export to nested i18n format (
lang:export-i18n) for Vue or frontend use - 🗃️ Offline caching of AI translations to avoid repeated costs
- ✅ Fully extendable, no frontend JS frameworks required
📦 Installation
Make sure you have OPENAI_API_KEY in your .env:
🛠️ Artisan Commands
🌐 Local Language Browser
Access this route in APP_ENV=local:
Note: This route is only registered in
localenvironment.
- View translations from any existing
.jsonlanguage file - Switch between languages with a dropdown
- Built using Tailwind CSS (via CDN)
- Can do remote view enabling AUTO_TRANSLATE_REMOTE_VIEW_ENABLED=true and setting up token by AUTO_TRANSLATE_REMOTE_VIEW_TOKEN
📁 Output Examples
en.json (flat)
en.i18n.json (nested)
📚 Configuration
Publish the config:
You can configure:
🤖 AI Translation Strategy
- Uses OpenAI Chat API (
gpt-4o,gpt-3.5, etc.) - Can Use Groak Api too
- Breaks translations into chunks
- Prompts ChatGPT to preserve keys, variables (
:name,:count, etc.) - Saves translated output as
es.json,fr.json, etc.
📜 License
This package is open-source software licensed under the MIT license.
🙋♀️ Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
📣 Credits
Made with ❤️ by Indunil Peramuna
Built for Laravel developers who love clean translation management.
All versions of laravel-auto-translations with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
openai-php/client Version ^0.7
laravel/prompts Version ^0.3.6