backstage / laravel-translations
A Laravel translations package
Fund package maintenance!
vormkracht10
Installs: 4 430
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 3
Requires
- php: ^8.2
- backstage/laravel-permanent-cache: dev-main
- deeplcom/deepl-php: >=1.12
- echolabsdev/prism: >0.65
- illuminate/contracts: ^10.0||^11.0||^12.0
- lorisleiva/laravel-actions: >=2.0
- spatie/fork: ^1.2
- spatie/laravel-package-tools: ^1.16
- stichoza/google-translate-php: ^5.2
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- dev-main
- v0.3.1
- v0.3.0
- v0.2.20
- v0.2.19
- v0.2.18
- v0.2.17
- v0.2.16
- v0.2.15
- v0.2.14
- v0.2.13
- v0.2.12
- v0.2.11
- v0.2.10
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.26
- v0.1.25
- v0.1.24
- v0.1.23
- v0.1.22
- v0.1.21
- v0.1.20
- v0.1.19
- v0.1.18
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-feature/docs
- dev-feature/morph-translations
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-6
- dev-feature/user-based-translations
- dev-feature/ai
- dev-develop
This package is auto-updated.
Last update: 2025-09-26 15:14:37 UTC
README
Laravel Translations
Nice to meet you, we're Vormkracht10
Break Language Barriers, Empower Global Success
Quick Start
Laravel Translations makes multilingual Laravel applications simple. Scan, translate, and manage your translations automatically.
1. Install
composer require backstage/laravel-translations
php artisan vendor:publish --provider="Backstage\Translations\Laravel\TranslationServiceProvider"
php artisan migrate
2. Add Languages
php artisan translations:languages:add en English php artisan translations:languages:add es Spanish php artisan translations:languages:add fr French
3. Scan & Translate
# Scan your app for translation strings php artisan translations:scan # Translate them automatically php artisan translations:translate
That's it! Your translations are now managed automatically.
Features
- 🌐 Multiple Providers: Google Translate, DeepL, AI (OpenAI, etc.)
- 🔄 Auto-Scanning: Finds
trans()
,__()
,@lang
in your code - 🏷️ Model Attributes: Translate Eloquent model attributes automatically
- 📊 Language Management: Add, remove, and manage languages easily
- ⚡ Performance: Optional caching and queued operations
- 🎯 Laravel Integration: Works seamlessly with Laravel's translation system
Model Translation
Translate Eloquent model attributes automatically. See the Model Attributes guide for detailed setup and usage.
Commands
# Add languages php artisan translations:languages:add {locale} {label} # Scan for translations php artisan translations:scan # Translate strings php artisan translations:translate php artisan translations:translate --code=es php artisan translations:translate --update # Sync translations php artisan translations:sync
Translation Providers
Supports Google Translate, DeepL, and AI providers. See the Translation Providers guide for configuration details.
Documentation
📚 Complete Documentation - Detailed guides and API reference
- Installation & Setup
- Configuration
- Basic Usage
- Model Attributes
- Translation Providers
- Commands Reference
- Advanced Usage
Requirements
- PHP 8.2+
- Laravel 10.x, 11.x, or 12.x
License
MIT License. See LICENSE for details.