armincms/database-localization
Store Laravel translations in the database instead of language files. This package provides database-driven localization so you can manage and edit translation strings at runtime, with a simple model and query layer for retrieving localized values per locale.
0.3.0 is a maintenance-focused release for the package’s database-backed translation loader. It reverts earlier database and loader implementation changes and includes fixes for translation existence checks and updating translation values inside database transactions. Treat the loader/database internals as still in motion: pin 0.3.0 and validate against your app’s translation schema before upgrading.
Minimal steps:
0.3.0 in composer.json and install dependencies.php artisan migrate.__('key'), Lang::get('key'), and Lang::has('key') across your default and fallback locales.Where to look first:
updateOrCreate-style import keyed by locale, group, and key rather than blind inserts.DB::transaction. 0.3.0 fixes an issue with updating translation values inside database transactions, but still test both commit and rollback paths in your app.Lang::has(), Lang::hasForLocale(), fallback-locale behavior, missing groups, and empty translation values. The 0.3.0 existence-check fix is worth covering with a regression test.RefreshDatabase and include cases for transaction rollback, fallback locale resolution, and cached-vs-uncached reads.Lang::has() before relying on it for UI conditionals.php artisan config:clear locally and rebuild production caches intentionally.config:clear, cache:clear, and any package-specific translation cache).get, has, and group loading.How can I help you explore Laravel packages today?