rivalex/lingua
Database-driven translations for Laravel with a polished Livewire + Flux admin UI. Install and manage languages, edit strings in real time, and sync translations both ways between DB and PHP/JSON files via artisan commands. Supports Laravel 11–13, PHP 8.3+.
languages, language_lines, lingua_settings), enabling real-time edits without redeploys.Lingua::get(), Lingua::set()) provides a clean abstraction for programmatic access to translations, reducing boilerplate in application logic.lingua:install, lingua:sync-to-database) automate setup and sync, reducing manual effort.lingua:sync-to-database).spatie/laravel-html).spatie/laravel-translation-manager).trans_choice) that may need adaptation.lingua:sync-to-database to import existing translations.lingua:sync-to-local for backups.lang/ from Git).lingua:sync-to-local).laravel-lang for vendor translations. Ensure no duplicate packages are installed.php artisan optimize:clear) after sync operations.tightenco/ziggy or spatie/laravel-html for HTML sanitization.composer require rivalex/lingua).php artisan lingua:install (interactive wizard).config/lingua.php (e.g., routes_prefix, selector mode).php artisan lingua:sync-to-database.Lingua::get('key')).lingua:sync-to-local).to-database/to-local) require testing after updates.lingua_* tables. File-based backups may still be needed for compliance.php artisan lingua:clear-cache for UI issues.lingua_settings table for misconfigurations (e.g., selector mode).storage/logs/laravel.log.lingua:sync-to-local → manual merge → sync-to-database.lingua_* tables.locale and key columns are critical. Add:
Schema::table('language_lines', function (Blueprint $table) {
$table->index(['locale', 'key']);
});
Cache::remember).php artisan lingua:sync-to-database --chunk=1000
lingua:sync-to-local in CI to export translations for version control.lingua:add in deployment scripts).| Scenario | Impact | Mitigation |
|---|---|---|
| Database corruption | Lost translations | Regular backups + sync-to-local |
| Sync operation failure |
How can I help you explore Laravel packages today?