Laravel Translator Helper is a VS Code extension that auto-wraps static text in Laravel Blade files for localization. Simplify your Laravel app's internationalization with easy key generation and language file updates!
🚀 Features
🔑 Unique Keys: Auto-generate keys by transliterating Cyrillic to Latin or using camelCase for translations.
⚙️ Manual & Automatic Configuration:
Automatic: Automatically detect the file direction.(default)
Manual: Add the desired file by entering its name in the input field.
Case Configuration: Choose between camelCase or snake_case for your keys, with camelCase as the default.
📂 Directory Support: Easily manage localization files in your specified root directory.
⚡ Quick Wrap: Instantly wrap static text with __('key') for localization.
🌐 Google Translator: Use the Google Translator for free, but note that it has usage limits. If you encounter a 429 error, consider using a proxy.
📦 Installation
Open VS Code.
Go to Extensions (Ctrl+Shift+X).
Search Laravel Translator Helper and hit Install.
Reload VS Code. 🎉
⚙️ Configuration
Open VS Code settings (Ctrl+,).
Search for Laravel Translator Helper.
Set your Root Directory, e.g., resources/lang.
Choose the File Detection Mode:
Automatic: Automatically detects the file direction (default).
Manual: You can specify the desired file by entering its name in the input field.
Set the Key Case Configuration:
Use laravelTranslatorHelper.caseFormat to choose between camelCase or snake_case for your keys, with camelCase as the default.
Use laravelTranslatorHelper.filePathMode to determine how file paths are handled.
Right-click and choose Process and Update Localization Files.
Or press Ctrl+Alt+T to wrap text instantly.
📹 How to Use
Watch our How to Use video for a step-by-step guide on using this extension.
🎹 Keybindings
Ctrl+Alt+T: Quick wrap selected text.
🔜 Upcoming Features
v5
Open-source translator for keys and text.
v6
Highlighted static text that needs translation.
v7
Add a quick fix button for translations.
😺 Support Needed: For the next version, we need a VPS server to enhance functionality. This will help all Laravel users. Thank you for your support! You can buy me a coffee here.
🤝 Contributing
Contributions welcome! Submit a pull request or open an issue.