Stop manual locale file management! Eii Laravel Translator is a Visual Studio Code extension that automatically extracts translatable strings from your Blade files, generates clean JSON locale files, and provides instant, multi-language translation using Google Translate or DeepL APIs.
✨ Features and Benefits
This extension streamlines your multilingual Laravel development by offering intelligent and automated localization features:
- Automatic String Extraction: Instantly detect and extract all strings wrapped in the
__() function across your Blade files, ensuring no translation is missed.
- Seamless Multi-Language Translation: Supports high-quality, automated translation into multiple languages via your configured Google Translate or DeepL API key.
- Intelligent Merging & Preservation: Safely merge newly extracted strings into existing locale files without overwriting or losing any manual translations you've already made.
- Selective Processing: Process a single Blade file, a specific folder (e.g.,
resources/views/mail/*), or all Blade files in the project for maximum control.
- Smart File Selection: An interactive QuickPick interface with autocompletion allows you to easily select files or folders, starting from
resources/views/.
*
- Robust API Rate Limit Handling: Configure request delays (
delayMs) and retry logic to automatically respect API limits, ensuring reliable batch translations for large projects.
- Progress Reporting: Displays a visual progress bar during the extraction and translation process, so you're never left guessing.
🚀 Installation
- Open Visual Studio Code.
- Go to the Extensions view (
Ctrl+Shift+X or Cmd+Shift+X).
- Search for Eii Laravel Translator.
- Click Install.
⚙️ Usage Guide
You must configure your API provider and key before running the extension.
- Open VS Code Settings (
Ctrl+, or Cmd+,).
- Search for
eiiLaravelTranslator and set the following:
eiiLaravelTranslator.apiProvider: Choose google or deepl (default: deepl).
eiiLaravelTranslator.apiKey: Enter your valid API key for the selected provider.
eiiLaravelTranslator.delayMs: Set delay between API requests (default: 200 ms) to prevent rate limiting.
2. Run the Command
- Open a Laravel project in VS Code.
- Press
Ctrl+Shift+P (or Cmd+Shift+P) and select Extract and Translate Translations.
- Select Target Scope: In the QuickPick dropdown, choose your target:
- Start typing from
resources/views/ to select a specific Blade file.
- Choose a folder path with
/* (e.g., resources/views/mail/*).
- Choose
* for all Blade files in your project.
- Enter Target Languages: When prompted, enter a comma-separated list of target language codes (e.g.,
ja,fr,es).
The extension will now:
- Extract all
__() strings.
- Generate/update your source file (e.g.,
en.json) in resources/lang.
- Translate new strings and generate/update the target locale files (e.g.,
JA.json, FR.json).
🎬 Workflow Demonstration
Watch this short video/GIF to see the entire process in action:

⚠️ Requirements and Configuration
Requirements
- VS Code: Version 1.80.0 or higher.
- Laravel Project: Must contain Blade files with translatable strings using the
__() function.
- API Key: A valid API key for Google Translate or DeepL is mandatory for translations.
Configuration Options
| Setting |
Type |
Description |
Default |
eiiLaravelTranslator.apiProvider |
string |
Translation API provider (google or deepl). |
deepl |
eiiLaravelTranslator.apiKey |
string |
Your API key for the selected provider. |
|
eiiLaravelTranslator.delayMs |
number |
Delay in milliseconds between API requests to avoid rate limits. |
200 |
Known Issues
- Rate Limits: Free API tiers (e.g., DeepL free) may return "Too Many Requests" errors for large projects. Increase
delayMs or consider a paid API plan for consistent performance.
- Performance: To optimize performance, the extension automatically excludes files in the
vendor and node_modules directories.
🤝 Contributing
Contributions are welcome! Please refer to the guidelines in the repository for submitting issues or pull requests.
📝 License
This extension is licensed under the MIT License.
For issues, feature requests, or questions, please open an issue on the GitHub repository.
Eii Laravel Translator is a product of Eii Tech Solutions, Japan. For support or enterprise inquiries, visit our website: https://eiitechsolutions.com.
Start simplifying your Laravel localization today!