Description
laravel-translation-loader is a package for Laravel and Lumen that stores your translations in the database instead of only in language files. You keep using the usual __ translation helper, so existing code does not change. You can also mix the two sources: if a translation exists in both a language file and the database, the database version is returned. Translations are stored as LanguageLine records, which you create and save like any other model. The package replaces Laravel's translation service provider with its own, and it needs a migration that creates a language_lines table. You can optionally publish its config file. The README notes that publishing assets does not work out of the box in Lumen, and that you need to copy the files from the repository there. The package is designed to be extended, so you can write your own translation providers if you want the translations to come from a different source. It is maintained by Spatie, a web design agency in Antwerp, Belgium.…
Highlights
- Store translations in the database
- Keep using the __ translation helper
- Mix language files and database translations
- Creates a language_lines table through a migration
- Extendable with custom translation providers
Ratings & Reviews
No ratings yet
Be the first to rate Laravel Translation Loader.
People also visit
Laravel Translations
Laravel Translations UI package provides a user-friendly interface
Laravel Translation Loader FAQ
What does this package do?
It loads translations for a Laravel or Lumen app from the database, so you can manage them outside the language files.
Do I have to change how I write translations?
No. You can keep using the __ helper. The package only changes where the translations come from.
What happens if a translation is in both a file and the database?
The database version is returned.
How do I install it?
Install it with Composer, replace Laravel's translation service provider with the one in the package, and run the migrations to create the language_lines table.
Does it work with Lumen?
Yes, but the README says publishing assets does not work out of the box in Lumen, so you have to copy the files from the repository.
What are the best Laravel Translation Loader alternatives?
Popular alternatives to Laravel Translation Loader include Laravel Translatable String Exporter, Traduora and Easy Localization. See all Laravel Translation Loader alternatives



