mgcodeur/laravel-translation-loader
A Laravel package that swaps the default file-based translator for a database-driven loader, letting you store, manage, and edit translations in the database. Includes caching, migration and model support, and works with Laravel's existing trans() and __() helpers.
lang/ files and into storage your team can change live — this directly supports decisions like "can marketing fix this typo on Friday afternoon without an engineer," and removes translation updates from the release train.translations table + custom loader, (b) this package, (c) a full TMS (Lokalise, Crowdin, Phrase) with API sync. This package sits in the middle: it removes the build cost of the loader and caching layer without buying a translator workflow product. Choose it when you need runtime mutability, not when you need translator collaboration tooling.lang/ directories and usually forces a fork of Laravel's translator.^8.3 to ^8.1, so adoption is no longer gated on a PHP 8.3 upgrade. That removes a real objection in a legacy-heavy estate and keeps this package viable on the current LTS-to-next framework window.Adopt when:
Look elsewhere when:
lang/ files.On 1.2.0 specifically: minor, non-breaking, additive. No deprecations, no migration work, no API changes. It also widens the PHP floor and extends the test matrix to cover the Laravel 13 / PHP 8.1–8.2 pairings it claims to support — a credible signal that compatibility is tested rather than asserted. Low-risk upgrade; worth taking if you're on Laravel 12 and eyeing 13.
For executives: We have two viable ways to manage product copy — in code, or in the database. Today, every wording change is an engineering ticket and a release. This package lets non-engineers change copy directly, which converts recurring engineering work into content operations and shortens the loop from "marketing wants to reword the checkout page" to "done." The cost is small: one dependency, no new vendor contract, no new system to run. It also de-risks our platform upgrade — the latest release supports Laravel 10 through 13 and PHP 8.1+, so it won't become the thing that blocks us next year. Recommendation: adopt for runtime-editable copy; keep a documented fallback to file-based translations.
For engineering: This is a Laravel translation loader — a DB-backed driver for the existing translator, not a parallel i18n system. Call sites don't change; __() keeps working. It absorbs the part we'd otherwise hand-roll: source resolution, caching, and fallback. Version 1.2.0 is additive and non-breaking — Laravel 13 support, PHP floor widened to 8.1, orchestra/testbench ^11.0 and Pest 4 constraints extended, CI matrix expanded with explicit exclusions for unsupported framework/PHP pairs. No migrations or API changes on upgrade. What we still own: schema/migrations, cache invalidation on write, seeding and drift control against version-controlled defaults, and the admin surface. Two things to verify in a spike before we commit: the cache invalidation path on translation writes, and query cost at our key volume with a cold cache. Exit cost if we change our mind: low — it's a loader behind Laravel's translator interface, so reverting to file-based sources is a contained change, not a rewrite.
How can I help you explore Laravel packages today?